Commit d50a7f48 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Bug fix: Do not close the connection twice.

In writable(), the _send() call could have closed the connection so don't
close it again if aborted or don't disable write events polling has this is
already done.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1697 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent e04443e6
...@@ -242,7 +242,7 @@ class Connection(BaseConnection): ...@@ -242,7 +242,7 @@ class Connection(BaseConnection):
def writable(self): def writable(self):
"""Called when self is writable.""" """Called when self is writable."""
self._send() self._send()
if not self.pending(): if not self.write_buf and self.connector is not None:
if self.aborted: if self.aborted:
self.close() self.close()
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment