Commit a13c14e9 authored by Denis Bilenko's avatar Denis Bilenko

BaseServer: add 'closed' property

parent 537967e1
......@@ -258,6 +258,10 @@ class BaseServer(object):
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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment