Implement a logic to exit the server
Discussion from here
- expire active session and restart listening (/exit?) when no more packets arrive for 10 seconds?
- communicate clean exit with client and exit immediately when clean exit communicated?
Discussion from here