diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-12-27 18:02:53 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2014-12-27 18:41:15 +0100 |
commit | a9e95a33bc723dc42daea2fcde6dde1d4cc5efad (patch) | |
tree | 5310db9e500a10e836e0cd59651e2a727d29801a /test/test-tcp-bind6-error.c | |
parent | 025602da138ec9ca908f9303427903ea1dc06494 (diff) | |
download | libuv-a9e95a33bc723dc42daea2fcde6dde1d4cc5efad.tar.gz libuv-a9e95a33bc723dc42daea2fcde6dde1d4cc5efad.zip |
unix: only set SO_REUSEADDR when bind() fails
Only call setsockopt() when the initial bind() fails with EADDRINUSE,
then retry. Saves a system call in what is normally the common case.
PR-URL: https://github.com/libuv/libuv/pull/88
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Diffstat (limited to 'test/test-tcp-bind6-error.c')
0 files changed, 0 insertions, 0 deletions