@@ -1004,7 +1004,7 @@ bool mainLoop(const bool isActiveMode,
10041004 // ====== Incoming control message ====================================
10051005 int controlID;
10061006 for (controlID = controlIDMin; controlID <= controlIDMax; controlID++) {
1007- if (fds[controlID].revents & POLLIN) {
1007+ if (fds[controlID].revents & ( POLLIN|POLLERR) ) {
10081008 if ( (isActiveMode == false ) &&
10091009 (fds[controlID].fd == gControlSocket ) ) {
10101010 const int newSD = ext_accept (gControlSocket , nullptr , 0 );
@@ -1057,7 +1057,7 @@ bool mainLoop(const bool isActiveMode,
10571057 }
10581058
10591059 // ====== Incoming data message =======================================
1060- if ( (tcpID >= 0 ) && (fds[tcpID].revents & POLLIN) ) {
1060+ if ( (tcpID >= 0 ) && (fds[tcpID].revents & ( POLLIN|POLLERR) ) ) {
10611061 const int newSD = ext_accept (gTCPSocket , nullptr , 0 );
10621062 if (newSD >= 0 ) {
10631063 LOG_TRACE
@@ -1067,7 +1067,7 @@ bool mainLoop(const bool isActiveMode,
10671067 FlowManager::getFlowManager ()->addUnidentifiedSocket (IPPROTO_TCP, newSD);
10681068 }
10691069 }
1070- if ( (mptcpID >= 0 ) && (fds[mptcpID].revents & POLLIN) ) {
1070+ if ( (mptcpID >= 0 ) && (fds[mptcpID].revents & ( POLLIN|POLLERR) ) ) {
10711071 const int newSD = ext_accept (gMPTCPSocket , nullptr , 0 );
10721072 if (newSD >= 0 ) {
10731073 LOG_TRACE
@@ -1077,12 +1077,12 @@ bool mainLoop(const bool isActiveMode,
10771077 FlowManager::getFlowManager ()->addUnidentifiedSocket (IPPROTO_MPTCP, newSD);
10781078 }
10791079 }
1080- if ( (udpID >= 0 ) && (fds[udpID].revents & POLLIN) ) {
1080+ if ( (udpID >= 0 ) && (fds[udpID].revents & ( POLLIN|POLLERR) ) ) {
10811081 FlowManager::getFlowManager ()->lock ();
10821082 handleNetPerfMeterData (isActiveMode, now, IPPROTO_UDP, gUDPSocket );
10831083 FlowManager::getFlowManager ()->unlock ();
10841084 }
1085- if ( (sctpID >= 0 ) && (fds[sctpID].revents & POLLIN) ) {
1085+ if ( (sctpID >= 0 ) && (fds[sctpID].revents & ( POLLIN|POLLERR) ) ) {
10861086 const int newSD = ext_accept (gSCTPSocket , nullptr , 0 );
10871087 if (newSD >= 0 ) {
10881088 LOG_TRACE
@@ -1093,7 +1093,7 @@ bool mainLoop(const bool isActiveMode,
10931093 }
10941094 }
10951095#ifdef HAVE_DCCP
1096- if ( (dccpID >= 0 ) && (fds[dccpID].revents & POLLIN) ) {
1096+ if ( (dccpID >= 0 ) && (fds[dccpID].revents & ( POLLIN|POLLERR) ) ) {
10971097 const int newSD = ext_accept (gDCCPSocket , nullptr , 0 );
10981098 if (newSD >= 0 ) {
10991099 LOG_TRACE
0 commit comments