Skip to content

Commit

Permalink
tag correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
tehn committed Jun 22, 2021
1 parent 2a44381 commit 933cce2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/druid/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def __init__(self, repl, host, port):

async def handle(self, websocket, path):
(host, *args) = websocket.remote_address
self.repl.output(f'\n <ws connected: {host}>')
#self.repl.output(f'\n <ws connected: {host}>')
self.repl.handlers['crow_output'].append(
lambda output: asyncio.ensure_future(
self.handle_output(websocket, output)
Expand All @@ -23,9 +23,11 @@ async def handle(self, websocket, path):
self.repl.output(f'\n> {message}\n')
self.repl.crow.writeline(message)
except ConnectionClosedError as e:
self.repl.output(f'\n <ws disconnected: {host} ({e.code} {e.reason or "no reason"})>')
#self.repl.output(f'\n <ws disconnected: {host} ({e.code} {e.reason or "no reason"})>')
pass
else:
self.repl.output(f'\n <ws disconnected: {host}>')
#self.repl.output(f'\n <ws disconnected: {host}>')
pass

async def listen(self):
self.repl.output(f' <listening at ws://{self.host}:{self.port}>')
Expand Down

0 comments on commit 933cce2

Please sign in to comment.