Fix flake8
This commit is contained in:
parent
049f12096d
commit
076f0515ca
|
@ -635,7 +635,9 @@ def serve(host, port, request_handler, error_handler, before_start=None,
|
||||||
coros = []
|
coros = []
|
||||||
for conn in connections:
|
for conn in connections:
|
||||||
if hasattr(conn, "websocket") and conn.websocket:
|
if hasattr(conn, "websocket") and conn.websocket:
|
||||||
coros.append(conn.websocket.close_connection(after_handshake=True))
|
coros.append(
|
||||||
|
conn.websocket.close_connection(after_handshake=True)
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,9 @@ class GunicornWorker(base.Worker):
|
||||||
coros = []
|
coros = []
|
||||||
for conn in self.connections:
|
for conn in self.connections:
|
||||||
if hasattr(conn, "websocket") and conn.websocket:
|
if hasattr(conn, "websocket") and conn.websocket:
|
||||||
coros.append(conn.websocket.close_connection(after_handshake=False))
|
coros.append(
|
||||||
|
conn.websocket.close_connection(after_handshake=False)
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
conn.close()
|
conn.close()
|
||||||
_shutdown = asyncio.gather(*coros, loop=self.loop)
|
_shutdown = asyncio.gather(*coros, loop=self.loop)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user