Implement reconnecting upon connection loss