The issue with rebinding the address when restarting the server seems to be a
result of the default TCP socket configuration, which cause the previous binding
to wait for any possible last TCP packets in the connection. I gather that it
is generally altered in most servers by setting the SO_REUSEADDR option with
setsockopt(2).