[DEBUG] correct an init and check of error in HTTP
This commit is contained in:
parent
36e7081920
commit
d260646f29
@ -363,7 +363,7 @@ void enet::Http::getHeader() {
|
||||
bool headerEnded = false;
|
||||
std::string header;
|
||||
while (m_connection.getConnectionStatus() == enet::Tcp::status::link) {
|
||||
char type;
|
||||
char type = '?';
|
||||
int32_t len = m_connection.read(&type, 1);
|
||||
if (len == 0) {
|
||||
std::this_thread::sleep_for(std::chrono::microseconds(1));
|
||||
|
@ -177,6 +177,7 @@ int32_t enet::Tcp::read(void* _data, int32_t _maxLen) {
|
||||
if (rc == 0) {
|
||||
ENET_INFO("Connection closed");
|
||||
closeConn = true;
|
||||
size = 0;
|
||||
}
|
||||
if (closeConn == false) {
|
||||
// Data was received
|
||||
|
Loading…
x
Reference in New Issue
Block a user