mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user