def connect(self, endpoint): if endpoint not in self.connections: logger.debug("connecting to %s", endpoint) self.connections[endpoint] = Connection(self, endpoint) self.send_sock.connect(endpoint) gevent.sleep(0.02) return self.connections[endpoint]
def connect(self, endpoint): if endpoint not in self.connections: logger.debug("connect(%s)", endpoint) self.connections[endpoint] = Connection(self, endpoint) self.send_sock.connect(endpoint) for service in six.itervalues(self.installed_services): service.on_connect(endpoint) gevent.sleep(0.02) return self.connections[endpoint]
def connect(self, endpoint): if endpoint not in self.connections: self.connections[endpoint] = Connection(self, endpoint) return self.connections[endpoint]