Commit 3a363b85 authored by Vincent Pelletier's avatar Vincent Pelletier

When a connection is closed, it's not connecting anymore.

No kidding !
And there was a test for this. Muhaha.
parent 9e6a4d3c
...@@ -506,6 +506,7 @@ class Connection(BaseConnection): ...@@ -506,6 +506,7 @@ class Connection(BaseConnection):
self._handlers.clear() self._handlers.clear()
if self.connecting: if self.connecting:
handler.connectionFailed(self) handler.connectionFailed(self)
self.connecting = False
else: else:
handler.connectionClosed(self) handler.connectionClosed(self)
......
...@@ -731,7 +731,7 @@ class ConnectionTests(NeoUnitTestBase): ...@@ -731,7 +731,7 @@ class ConnectionTests(NeoUnitTestBase):
self._checkConnectionCompleted(1) self._checkConnectionCompleted(1)
self._checkReaderAdded(1) self._checkReaderAdded(1)
bc.writable() bc.writable()
self.assertTrue(bc.connecting) self.assertFalse(bc.connecting)
self.assertFalse(bc.pending()) self.assertFalse(bc.pending())
self.assertFalse(bc.aborted) self.assertFalse(bc.aborted)
self._checkWriteBuf(bc, '') self._checkWriteBuf(bc, '')
......
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