tweak FD_SETSIZE to reduce possibility of UDP timeouts

geez searching 4K sockets most of which are blank...

(cherry picked from commit 39b45e1d57)
pull/237/head
Rick V 6 years ago
parent 3232a98b2c
commit e083bb0e22
No known key found for this signature in database
GPG Key ID: C0EDC8723FDC3465

@ -190,7 +190,7 @@ namespace llarp
{
for(auto& item : m_Upstream)
{
auto& queue = item.second;
auto& queue = item.second;// XXX: uninitialised memory here!
while(queue.size())
{
auto& msg = queue.front();

@ -176,9 +176,6 @@ upoll_ctl(upoll_t* upq, int op, intptr_t fd, upoll_event_t* event)
int
upoll_wait_select(upoll_t* upq, upoll_event_t* evs, int nev, int timeout)
{
/* ok we need to test each file descriptor to see whether it is a real file
* or a socket. select any file handles (they are always ready)
*/
if(nev > FD_SETSIZE)
nev = FD_SETSIZE;

@ -29,10 +29,12 @@
#include <sys/stat.h>
// this is probably big enough to get
// the lesser of 4096 sockets or whatever
// the lesser of 96 sockets or whatever
// the system allows
// this used to be 4096, but i think
// that took ages to process
#ifndef FD_SETSIZE
#define FD_SETSIZE 4096
#define FD_SETSIZE 96
#endif
#include <io.h>

Loading…
Cancel
Save