diff options
Diffstat (limited to 'distbuild/connection_machine.py')
-rw-r--r-- | distbuild/connection_machine.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/distbuild/connection_machine.py b/distbuild/connection_machine.py index 3d4e8d04..648ce35a 100644 --- a/distbuild/connection_machine.py +++ b/distbuild/connection_machine.py @@ -81,6 +81,7 @@ class ConnectionMachine(distbuild.StateMachine): self.mainloop.add_event_source(self._timer) spec = [ + # state, source, event_class, new_state, callback ('connecting', self._sock_proxy, distbuild.SocketWriteable, 'connected', self._connect), ('connecting', self, StopConnecting, None, self._stop), @@ -97,7 +98,7 @@ class ConnectionMachine(distbuild.StateMachine): logging.debug( 'ConnectionMachine: connecting to %s:%s' % (self._addr, self._port)) - self._socket = socket.socket() + self._socket = distbuild.create_socket() distbuild.set_nonblocking(self._socket) try: self._socket.connect((self._addr, self._port)) |