ro_cleanup_delay

This commit is contained in:
Maxim Devaev
2022-06-19 04:10:42 +03:00
parent 74e81b6e03
commit 805ff9dd5f
3 changed files with 9 additions and 3 deletions

View File

@@ -359,9 +359,11 @@ class HttpServer:
)
], return_exceptions=True)
async def _close_all_wss(self) -> None:
for ws in self._get_wss():
async def _close_all_wss(self) -> bool:
wss = self._get_wss()
for ws in wss:
await self.__close_ws(ws)
return bool(wss)
def _get_wss(self) -> List[WsSession]:
return list(self.__ws_sessions)