future
This commit is contained in:
@@ -32,8 +32,11 @@ int TCPSocket::connect(Address& serveraddr) {
|
||||
|
||||
int TCPSocket::recv(void *__restrict __buf, size_t __n, int __flags) {
|
||||
int retVal = ::recv(sock, (char *)__buf, __n, __flags);
|
||||
if (retVal == SOCKET_ERROR)
|
||||
if (retVal == SOCKET_ERROR) {
|
||||
if (errno == EAGAIN || errno == EWOULDBLOCK)
|
||||
return retVal;
|
||||
log::error("recv()");
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user