From 95a72e6ac9044f50f23907cb38df9212005ce66b Mon Sep 17 00:00:00 2001 From: meejah Date: Wed, 14 Apr 2021 16:53:37 -0600 Subject: [PATCH] better comment --- src/wormhole_transit_relay/server_state.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/wormhole_transit_relay/server_state.py b/src/wormhole_transit_relay/server_state.py index 3192480..06a26bf 100644 --- a/src/wormhole_transit_relay/server_state.py +++ b/src/wormhole_transit_relay/server_state.py @@ -246,6 +246,10 @@ class TransitServerState(object): def _remember_client(self, client): self._client = client + # note that there is no corresponding "_forget_client" because we + # may still want to access it after it is gone .. for example, to + # get the .started_time for logging purposes + @_machine.output() def _register_token(self, token): return self._real_register_token_for_side(token, None) @@ -388,13 +392,10 @@ class TransitServerState(object): Terminal state """ - # need a listening.upon(connection_lost) for special websocket - # case where handshake fails? - listening.upon( connection_made, enter=wait_relay, - outputs=[_remember_client], # XXX need _forget_client ? + outputs=[_remember_client], ) listening.upon( connection_lost,