code: @Override
      public void connectionClosed() {
          lock.lock();
          try {
              connectionOpen = false;
              if (state != null)
                  state.disconnectFromChannel();
          } finally {
              lock.unlock();
          }
      }
docs: <p>Called when the connection terminates. Notifies the {@link StoredClientChannel} object that we can attempt to
  resume this channel in the future and stops generating messages for the server.</p>
  
  <p>For stateless protocols, this translates to a client not using the channel for the immediate future, but
  intending to reopen the channel later. There is likely little reason to use this in a stateless protocol.</p>
  
  <p>Note that this <b>MUST</b> still be called even after either
  {@link IPaymentChannelClient.ClientConnection#destroyConnection(PaymentChannelCloseException.CloseReason)} or
  {@link PaymentChannelClient#settle()} is called, to actually handle the connection close logic.</p>