Close connection when flush fails
This commit is contained in:
parent
826a1fdaa2
commit
be1377850e
|
@ -88,6 +88,9 @@ class ServerConnection(tcp.TCPClient):
|
|||
def terminate(self):
|
||||
try:
|
||||
self.wfile.flush()
|
||||
except IOError:
|
||||
pass
|
||||
try:
|
||||
self.connection.close()
|
||||
except IOError:
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue