Commits

Denis Bilenko committed 5bafc69

BaseServer: add 'closed' property

  • Participants
  • Parent commits 64cead5

Comments (0)

Files changed (1)

File gevent/baseserver.py

                 if self.pool is not None:
                     self.pool._semaphore.unlink(self._start_accepting_if_started)
 
+    @property
+    def closed(self):
+        return not hasattr(self, 'socket')
+
     def stop(self, timeout=None):
         """Stop accepting the connections and close the listening socket.