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
This commit is contained in:
psychon
2010-10-24 09:04:17 +00:00
parent d3279f9707
commit a785b0dc08
+1 -1
View File
@@ -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;