Infelizmente, no Linux não há nada que você possa fazer (além de consertar o código para definir SO_REUSEADDR
). De man 7 socket
:
Linux will only allow port reuse with the SO_REUSEADDR option when this
option was set both in the previous program that performed a bind(2) to
the port and in the program that wants to reuse the port. This differs
from some implementations (e.g., FreeBSD) where only the later program
needs to set the SO_REUSEADDR option. Typically this difference is invisible,
since, for example, a server program is designed to always set this option.