Server: prevent crash when listening to the same port twice