Przeglądaj źródła

bugfix, server didn't create it's socket. now it does

digital 7 lat temu
rodzic
commit
53b4ebda5f
1 zmienionych plików z 5 dodań i 4 usunięć
  1. 5 4
      network/__init__.py

+ 5 - 4
network/__init__.py

@@ -204,10 +204,12 @@ class Server(object):
 
     def setup(self):
         """
-        opens the connection and starts listening for clients. this method
-        does not block, it returns after starting to listen.
+        creates a scoket, opens the connection and starts listening for
+        clients. this method does not block, it returns after starting to
+        listen.
         """
-        lserver.info("setting up socket")
+        lserver.info("setting up server")
+        self.socket = self.make_socket
         if self.af_family == "AF_INET":
             self.socket.bind((self.host, self.port))
         elif self.af_family == "AF_UNIX":
@@ -217,7 +219,6 @@ class Server(object):
                 os.remove(self.host)
             self.socket.bind(self.host)
         self.socket.listen(self.max_allowed_clients)
-        # self.socket.settimeout(1)
 
     def shutdown(self):
         """