Remove exception when using SO_REUSEADDR on Linux (#3856)
authorSylvan Clebsch <sylvan.clebsch@gmail.com>
Tue, 1 Nov 2016 22:41:46 +0000 (22:41 +0000)
committerLudovic Henry <ludovic@xamarin.com>
Tue, 1 Nov 2016 22:41:46 +0000 (18:41 -0400)
commit0760eeaff0e10d1c2fd3489649dc263aed6400df
treeb08d8340feae7c2c01524bbb5197d1e0c0e3dc0f
parent81b391fbbd1d42a03f7137ce30aca4ea50c82d2c
Remove exception when using SO_REUSEADDR on Linux (#3856)

SO_REUSEADDR and SO_REUSEPORT are fundamentally different. This
exception seems to have been put in place to address the lack of
the latter on older Linux kernels for TCP. However, the change in
fact raises an exception when SO_REUSEADDR is used, which causes
failures in server applications, which may use SO_REUSEADDR to
avoid WAIT state timeouts.

Description of SO_REUSEADDR and SO_REUSEPORT differences:

http://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t

Some problems caused by raising this exception:

https://github.com/zeromq/netmq/issues/623
https://github.com/zeromq/netmq/issues/592
https://github.com/fsprojects/IfSharp/issues/90
mcs/class/System/System.Net.Sockets/Socket.cs