http://bugs.winehq.org/show_bug.cgi?id=26031
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #37438|0 |1 is obsolete| |
--- Comment #66 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 47020 --> http://bugs.winehq.org/attachment.cgi?id=47020 Always use SO_REUSEADDR
After re-reading this bug, the kernel bug and the discussions in kernel netdev list started by Artem I created the simple attached patch that "solves" this issue.
SO_REUSEADDR on linux at least will not allow the same program to bind twice in the same port.
Keeping SO_REUSEADDR after the socket is closed is the key to allow the next process to bind to the same address.