diff --git a/stratum/protocol.py b/stratum/protocol.py index 02d9954..f56e56a 100644 --- a/stratum/protocol.py +++ b/stratum/protocol.py @@ -85,7 +85,10 @@ def transport_write(self, data): '''Overwrite this if transport needs some extra care about data written to the socket, like adding message format in websocket.''' try: - self.transport.write(data) + if self.transport != None: + self.transport.write(data) + else: + log.info ("Client disconnected") except AttributeError: # Transport is disconnected pass