From: <ps...@us...> - 2010-10-24 09:04:23
|
Revision: 2165 http://znc.svn.sourceforge.net/znc/?rev=2165&view=rev Author: psychon Date: 2010-10-24 09:04:17 +0000 (Sun, 24 Oct 2010) Log Message: ----------- 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. Modified Paths: -------------- trunk/Csocket.h Modified: trunk/Csocket.h =================================================================== --- trunk/Csocket.h 2010-10-23 11:50:57 UTC (rev 2164) +++ trunk/Csocket.h 2010-10-24 09:04:17 UTC (rev 2165) @@ -1919,7 +1919,7 @@ 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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |