future
This commit is contained in:
@@ -15,6 +15,8 @@ IOCP::~IOCP() {
|
||||
|
||||
void IOCP::destruct() {
|
||||
#ifdef __linux__
|
||||
uint64_t u = 1;
|
||||
::write(epollDetroyerFd_, &u, sizeof(uint64_t));
|
||||
close(epollfd_);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -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