File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ namespace ix
140140
141141 // mapping
142142 long networkEvents = 0 ;
143- if (fd->events & (POLLIN )) networkEvents |= FD_READ | FD_ACCEPT;
143+ if (fd->events & (POLLIN )) networkEvents |= FD_READ | FD_ACCEPT | FD_CLOSE ;
144144 if (fd->events & (POLLOUT /* | POLLWRNORM | POLLWRBAND*/ )) networkEvents |= FD_WRITE | FD_CONNECT;
145145 // if (fd->events & (POLLPRI | POLLRDBAND )) networkEvents |= FD_OOB;
146146
@@ -183,8 +183,9 @@ namespace ix
183183 else if (netEvents.lNetworkEvents != 0 )
184184 {
185185 // mapping
186- if (netEvents.lNetworkEvents & (FD_READ | FD_ACCEPT | FD_OOB)) fd->revents |= POLLIN;
187- if (netEvents.lNetworkEvents & (FD_WRITE | FD_CONNECT )) fd->revents |= POLLOUT;
186+ if (netEvents.lNetworkEvents & (FD_READ | FD_ACCEPT | FD_OOB | FD_CLOSE)) fd->revents |= POLLIN;
187+ if (netEvents.lNetworkEvents & (FD_WRITE | FD_CONNECT )) fd->revents |= POLLOUT;
188+ if (netEvents.lNetworkEvents & (FD_CLOSE )) fd->revents |= POLLHUP;
188189
189190 for (int i = 0 ; i < FD_MAX_EVENTS; ++i)
190191 {
You can’t perform that action at this time.
0 commit comments