소스 검색

send close_session when main task finished

wangweimin 5 년 전
부모
커밋
9ed795d8d5
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      pywebio/framework.py

+ 1 - 0
pywebio/framework.py

@@ -67,6 +67,7 @@ class WebIOSession:
                 del self.coros[sub_task.coro_id]
 
         if self.main_task.task_finished:
+            self.send_coro_msg(dict(command='close_session'))
             self.close()
 
     def send_coro_msg(self, message):