MCPcopy
hub / github.com/tornadoweb/tornado / stop

Method stop

tornado/tcpserver.py:306–319  ·  view source on GitHub ↗

Stops listening for new connections. Requests currently in progress may still continue after the server is stopped.

(self)

Source from the content-addressed store, hash-verified

304 self.add_sockets(sockets)
305
306 def stop(self) -> None:
307 """Stops listening for new connections.
308
309 Requests currently in progress may still continue after the
310 server is stopped.
311 """
312 if self._stopped:
313 return
314 self._stopped = True
315 for fd, sock in self._sockets.items():
316 assert sock.fileno() == fd
317 # Unregister socket from IOLoop
318 self._handlers.pop(fd)()
319 sock.close()
320
321 def handle_stream(
322 self, stream: IOStream, address: tuple

Callers 1

test_stop_twiceMethod · 0.95

Calls 3

itemsMethod · 0.80
filenoMethod · 0.45
closeMethod · 0.45

Tested by 1

test_stop_twiceMethod · 0.76