fix missed fd_set
This commit is contained in:
@@ -176,6 +176,7 @@ result_t FileTransport::read(unsigned int timeout, const uint8_t** data, size_t*
|
||||
FD_ZERO(&readfds);
|
||||
FD_ZERO(&exceptfds);
|
||||
FD_SET(m_fd, &readfds);
|
||||
FD_SET(m_fd, &exceptfds);
|
||||
|
||||
ret = pselect(m_fd + 1, &readfds, nullptr, &exceptfds, &tdiff, nullptr);
|
||||
if (ret >= 1 && FD_ISSET(m_fd, &exceptfds)) {
|
||||
|
||||
@@ -160,6 +160,8 @@ int tcpKeepAliveInterval) {
|
||||
FD_ZERO(&writefds);
|
||||
FD_ZERO(&exceptfds);
|
||||
FD_SET(sfd, &readfds);
|
||||
FD_SET(sfd, &writefds);
|
||||
FD_SET(sfd, &exceptfds);
|
||||
#ifdef HAVE_PSELECT
|
||||
ret = pselect(sfd + 1, &readfds, &writefds, &exceptfds, &tdiff, nullptr);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user