some simple reconnect logic