Browse Source

send close_session when main task finished

wangweimin 5 năm trước cách đây
mục cha
commit
9ed795d8d5
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  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):