Explorar el Código

Now that btpd doesn't use select, we don't need to limit fd's to FD_SETSIZE

unless libevent uses the select method.
master
Richard Nyberg hace 18 años
padre
commit
fb64d693f1
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. +3
    -1
      btpd/net.c

+ 3
- 1
btpd/net.c Ver fichero

@@ -655,7 +655,9 @@ net_init(void)
m_bw_bytes_out = net_bw_limit_out;
m_bw_bytes_in = net_bw_limit_in;

int safe_fds = min(getdtablesize(), FD_SETSIZE) * 4 / 5;
int safe_fds = getdtablesize() * 4 / 5;
if (strcmp(event_get_method(), "select") == 0)
safe_fds = min(safe_fds, FD_SETSIZE * 4 / 5);
if (net_max_peers == 0 || net_max_peers > safe_fds)
net_max_peers = safe_fds;



Cargando…
Cancelar
Guardar