mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
BUG/MINOR: do not close uninit FD in quic_test_socketops()
On startup, quic_test_socketops() is called to ensure that chosen configuration option are compatible with UDP system stack. A dummy FD is allocated to invoke various setsockopt() settings. If no tests are required, FD is not allocated. In this case, close() should not be close. This is mostly for better coding as this does not cause any real issue for users. This should fix github issue #2638. No need to backport.
This commit is contained in:
parent
05f33e95ba
commit
d57b95aab7
1 changed files with 2 additions and 1 deletions
|
|
@ -577,7 +577,8 @@ static int quic_test_socketopts(struct listener *l)
|
|||
#endif
|
||||
}
|
||||
|
||||
close(fdtest);
|
||||
if (fdtest >= 0)
|
||||
close(fdtest);
|
||||
return ERR_NONE;
|
||||
|
||||
err:
|
||||
|
|
|
|||
Loading…
Reference in a new issue