summaryrefslogtreecommitdiff
path: root/distbuild/connection_machine.py
diff options
context:
space:
mode:
Diffstat (limited to 'distbuild/connection_machine.py')
-rw-r--r--distbuild/connection_machine.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/distbuild/connection_machine.py b/distbuild/connection_machine.py
index 648ce35a..6dec403f 100644
--- a/distbuild/connection_machine.py
+++ b/distbuild/connection_machine.py
@@ -118,6 +118,7 @@ class ConnectionMachine(distbuild.StateMachine):
logging.error(
'Failed to connect to %s:%s: %s' %
(self._addr, self._port, str(e)))
+
self.mainloop.queue_event(self, ConnectError())
return
self._sock_proxy.event_source = None
@@ -144,3 +145,5 @@ class ConnectionMachine(distbuild.StateMachine):
def _start_timer(self, event_source, event):
self._timer.start()
+ self._sock_proxy.event_source.close()
+ self._sock_proxy.event_source = None