Typo fix
Moved the server stop into a finally block. Also catch more exception.
Changed the socket option so the address can be reused quickly after a server crash.