diff --git a/src/lib/utils/tcpsocket.cpp b/src/lib/utils/tcpsocket.cpp index ac78e737..3efe6321 100755 --- a/src/lib/utils/tcpsocket.cpp +++ b/src/lib/utils/tcpsocket.cpp @@ -98,7 +98,7 @@ TCPSocket* TCPClient::connect(const string& server, const uint16_t& port, int ti fds[0].fd = sfd; fds[0].events = POLLIN|POLLOUT; ret = ppoll(fds, nfds, &tdiff, NULL); - if (ret >= 1 && fds[0].revents & POLLERR) { + if (ret == 1 && fds[0].revents & POLLERR) { ret = -1; } #else