mirror of
https://github.com/google/gops.git
synced 2025-02-19 19:59:55 +02:00
Introduce Option.SocketReuseAddrAndPort which, if set, will lead to the SO_REUSEPORT socket option being set on the listening socket on Unix-like OSes. This also sets SO_REUSEADDR which is already the default in net.Listen (see net.setDefaultSockopts). Setting these options increases the chance to re-bind() to the same address and port upon agent restart if Options.Addr is set. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>