Explorar o código

shutdown called itself instead of async_shutdown

digital %!s(int64=7) %!d(string=hai) anos
pai
achega
f0d91bda32
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      network/__init__.py

+ 3 - 2
network/__init__.py

@@ -271,7 +271,8 @@ class Server(object):
         # list of all active connection handlers
         self.connection_handler = []
         # register our cleanup method to be executed when the program exits.
-        # the cleanup function unregisters itself, so it won't get executed twice when the user called it befor the program exites
+        # the cleanup function unregisters itself, so it won't get executed
+        # twice when the user called it befor the program exites
         atexit.register(self.shutdown)
 
     def make_socket(self):
@@ -323,7 +324,7 @@ class Server(object):
         this method can be called synchronous and calls the asynchronous
         shutdown method.
         """
-        curio.run(self.shutdown)
+        curio.run(self.async_shutdown)
 
     async def async_shutdown(self):
         """