diff --git a/src/wormhole/transit.py b/src/wormhole/transit.py index addb3cb..ebeb960 100644 --- a/src/wormhole/transit.py +++ b/src/wormhole/transit.py @@ -244,7 +244,7 @@ class Connection(protocol.Protocol, policies.TimeoutMixin): if self.state == "records": return self.dataReceivedRECORDS() if self.state == "hung up": - pass + return if isinstance(self.state, Exception): # for tests raise self.state raise ValueError("internal error: unknown state %s" % (self.state,))