Mercurial > dropbear
comparison dbutil.c @ 936:d93a6bcf616f
Improve handling lots of concurrent forwarded connections. Increase
connection backlog, avoid check_close() for channels that haven't had IO
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 25 Jun 2014 23:42:39 +0800 |
parents | 8f04e36622c0 |
children | ef8d939de3dd |
comparison
equal
deleted
inserted
replaced
935:25692c60479e | 936:d93a6bcf616f |
---|---|
330 close(sock); | 330 close(sock); |
331 TRACE(("bind(%s) failed", port)) | 331 TRACE(("bind(%s) failed", port)) |
332 continue; | 332 continue; |
333 } | 333 } |
334 | 334 |
335 if (listen(sock, 20) < 0) { | 335 if (listen(sock, DROPBEAR_LISTEN_BACKLOG) < 0) { |
336 err = errno; | 336 err = errno; |
337 close(sock); | 337 close(sock); |
338 TRACE(("listen() failed")) | 338 TRACE(("listen() failed")) |
339 continue; | 339 continue; |
340 } | 340 } |