Преглед изворни кода

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 пре 19 година
родитељ
комит
fb64d693f1
1 измењених фајлова са 3 додато и 1 уклоњено
  1. +3
    -1
      btpd/net.c

+ 3
- 1
btpd/net.c Прегледај датотеку

@@ -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;



Loading…
Откажи
Сачувај