Ver Fonte

Correct socket polling on mapping

z3APA3A há 7 anos atrás
pai
commit
3f2e621902
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      src/sockmap.c

+ 2 - 2
src/sockmap.c

@@ -144,11 +144,11 @@ int splicemap(struct clientparam * param, int timeo){
 	fds[0].events |= POLLIN;
     }
     if(!fds[0].events && !fds[1].events) RETURN (666);
-    if(!fds[0].events){
+    if(fds[0].fd == INVALID_SOCKET){
 	fdsp = fds +1;
 	fdsc = 1;
     }
-    else if(!fds[1].events){
+    else if(fds[1].fd == INVALID_SOCKET){
 	fdsp = fds;
 	fdsc = 1;
     }