mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
875f10287e
commit
3c3f65f1c2
@ -550,8 +550,13 @@ class EchoHandler(object):
|
||||
def handle_websocket_close(self, connection_id):
|
||||
self.ws_connections.pop(connection_id, None)
|
||||
|
||||
if __name__ == '__main__':
|
||||
def run_echo_server():
|
||||
s = ServerLoop(create_http_handler(websocket_handler=EchoHandler()))
|
||||
with HandleInterrupt(s.wakeup):
|
||||
s.serve_forever()
|
||||
|
||||
if __name__ == '__main__':
|
||||
# import cProfile
|
||||
# cProfile.runctx('r()', {'r':run_echo_server}, {}, filename='stats.profile')
|
||||
run_echo_server()
|
||||
# }}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user