From a785b0dc083e225afcccfbcc999ee9443175c8c7 Mon Sep 17 00:00:00 2001 From: psychon Date: Sun, 24 Oct 2010 09:04:17 +0000 Subject: [PATCH] Csocket: Fix a bug with poll() and CExecSock select() says a socket is readable when the other end hangs up, with poll() you only get POLLHUP. These other flags should all be handled like POLLIN. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2165 726aef4b-f618-498e-8847-2d620e286838 --- Csocket.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Csocket.h b/Csocket.h index 7032de4a..c44e7f41 100644 --- a/Csocket.h +++ b/Csocket.h @@ -1919,7 +1919,7 @@ protected: for( uCurrPoll = 0; uCurrPoll < uMaxFD; ++uCurrPoll ) { short iEvents = 0; - if( (pFDs[uCurrPoll].revents & POLLIN ) ) + if( (pFDs[uCurrPoll].revents & (POLLIN|POLLERR|POLLHUP|POLLNVAL) ) ) iEvents |= eCheckRead; if( (pFDs[uCurrPoll].revents & POLLOUT ) ) iEvents |= eCheckWrite;