Skip to content
Snippets Groups Projects
Commit a0204b14 authored by Florian Fischer's avatar Florian Fischer
Browse files

Fix repeated io tests using listen sockets

The tests may fail when repeated because the listener may bind to fast
to the tcp tuple again. This is fixed by using SO_REUSEPORT instead of SO_REUSEADDR.

TIL: SO_REUSEADDR is about address wildcards and SO_REUSEPORT allows
binding to the same tcp tuple.
https://stackoverflow.com/questions/14388706/how-do-so-reuseaddr-and-so-reuseport-differ

Add a generic way to specify socket options when creating a listen socket
with tcp_listener.
parent 94774ec7
No related branches found
No related tags found
1 merge request!255Fix repeated ConcurrentNetworkEchoTest and SimpleNetworkTest
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment