Close connection when flush fails

This commit is contained in:
Matthias Urlichs 2013-06-26 15:00:33 +02:00
parent 826a1fdaa2
commit be1377850e
1 changed files with 3 additions and 0 deletions

View File

@ -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