Browse Source

select for Linux needs the nfds parameter set correctly

bel 11 năm trước cách đây
mục cha
commit
7af15c4934
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/mod_lua.inl

+ 1 - 1
src/mod_lua.inl

@@ -634,7 +634,7 @@ static int lua_websocket_data(struct mg_connection *conn, int bits, char *data,
 
 
                 tv.tv_sec = (unsigned long)delay;
                 tv.tv_sec = (unsigned long)delay;
                 tv.tv_usec = (unsigned long)(((double)delay - (double)((unsigned long)delay))*1000000.0);
                 tv.tv_usec = (unsigned long)(((double)delay - (double)((unsigned long)delay))*1000000.0);
-                retry = (0==select(1, &rfds, NULL, NULL, &tv));
+                retry = (0==select(conn->client.sock+1, &rfds, NULL, NULL, &tv));
             }
             }
         }
         }
     } while (retry);
     } while (retry);