Make the client more resilient when server is stopped or crashes.
Currently, when the server is stopped (or crashes for some reason), the client will crash when it tries sending a new message to the server. Perhaps when this happens, we disconnect the client and then try periodically reconnecting... i.e. every 10 seconds, try reconnecting, up to a maximum of 3 times.
Make the client more resilient when server is stopped or crashes.
Currently, when the server is stopped (or crashes for some reason), the client will crash when it tries sending a new message to the server. Perhaps when this happens, we disconnect the client and then try periodically reconnecting... i.e. every 10 seconds, try reconnecting, up to a maximum of 3 times.