diff --git a/src/lib/ebus/transport.cpp b/src/lib/ebus/transport.cpp index fb40ede6..2a2ec4cc 100644 --- a/src/lib/ebus/transport.cpp +++ b/src/lib/ebus/transport.cpp @@ -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)) { diff --git a/src/lib/utils/tcpsocket.cpp b/src/lib/utils/tcpsocket.cpp index d3eae612..19ef1a4a 100755 --- a/src/lib/utils/tcpsocket.cpp +++ b/src/lib/utils/tcpsocket.cpp @@ -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