Fix fr::Socket receive_all bug
Introduced with disconnect tweaking a few days ago.
This commit is contained in:
parent
697573cbaf
commit
dc247c556d
@ -49,7 +49,7 @@ namespace fr
|
||||
size_t received = 0;
|
||||
auto *arr = (char*)dest;
|
||||
Status status = receive_raw(&arr[bytes_read], (size_t)bytes_remaining, received);
|
||||
if(status == fr::Socket::Disconnected)
|
||||
if(status != fr::Socket::WouldBlock && status != fr::Socket::Success)
|
||||
return status;
|
||||
bytes_remaining -= received;
|
||||
bytes_read += received;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user