File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -1177,22 +1177,23 @@ static CURLMcode Curl_multi_wait(struct Curl_multi *multi,
1177
1177
long mask = 0 ;
1178
1178
#endif
1179
1179
if (bitmap & GETSOCK_READSOCK (i )) {
1180
+ s = sockbunch [i ];
1180
1181
#ifdef USE_WINSOCK
1181
1182
mask |= FD_READ |FD_ACCEPT |FD_CLOSE ;
1182
1183
#endif
1183
- ufds [nfds ].fd = sockbunch [ i ] ;
1184
+ ufds [nfds ].fd = s ;
1184
1185
ufds [nfds ].events = POLLIN ;
1185
1186
++ nfds ;
1186
- s = sockbunch [i ];
1187
1187
}
1188
1188
if (bitmap & GETSOCK_WRITESOCK (i )) {
1189
+ s = sockbunch [i ];
1189
1190
#ifdef USE_WINSOCK
1190
1191
mask |= FD_WRITE |FD_CONNECT |FD_CLOSE ;
1192
+ send (s , NULL , 0 , 0 ); /* reset FD_WRITE */
1191
1193
#endif
1192
- ufds [nfds ].fd = sockbunch [ i ] ;
1194
+ ufds [nfds ].fd = s ;
1193
1195
ufds [nfds ].events = POLLOUT ;
1194
1196
++ nfds ;
1195
- s = sockbunch [i ];
1196
1197
}
1197
1198
if (s == CURL_SOCKET_BAD ) {
1198
1199
break ;
@@ -1218,8 +1219,10 @@ static CURLMcode Curl_multi_wait(struct Curl_multi *multi,
1218
1219
mask |= FD_READ |FD_ACCEPT |FD_CLOSE ;
1219
1220
if (extra_fds [i ].events & CURL_WAIT_POLLPRI )
1220
1221
mask |= FD_OOB ;
1221
- if (extra_fds [i ].events & CURL_WAIT_POLLOUT )
1222
+ if (extra_fds [i ].events & CURL_WAIT_POLLOUT ) {
1222
1223
mask |= FD_WRITE |FD_CONNECT |FD_CLOSE ;
1224
+ send (extra_fds [i ].fd , NULL , 0 , 0 ); /* reset FD_WRITE */
1225
+ }
1223
1226
if (WSAEventSelect (extra_fds [i ].fd , multi -> wsa_event , mask ) != 0 ) {
1224
1227
if (ufds_malloc )
1225
1228
free (ufds );
You can’t perform that action at this time.
0 commit comments