Handled disconnection and reconnection