fr::TcpSocket bug fix

Recv's return value was being checked to see if it was greater or equal to 0, if everything was okay. 0 indicates connection closed, and so the socket should have disconnected instead of returning Success.
This commit is contained in:
Fred Nicolson 2017-07-19 10:46:07 +01:00
parent e748fde121
commit ec95d0ac36

View File

@ -55,7 +55,7 @@ namespace fr
//Read RECV_CHUNK_SIZE bytes into the recv buffer
int64_t status = ::recv(socket_descriptor, (char*)data, buffer_size, 0);
if(status >= 0)
if(status > 0)
{
received += status;
}