瀏覽代碼

fix ThreadBasedWebIOSession msg lost when session close bug

wangweimin 5 年之前
父節點
當前提交
1e208d4115
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      pywebio/session/threadbased.py

+ 2 - 1
pywebio/session/threadbased.py

@@ -124,7 +124,8 @@ class ThreadBasedWebIOSession(AbstractSession):
 
     def _cleanup(self):
         self.event_mqs = {}
-        self.unhandled_task_msgs = []
+        # Don't clean unhandled_task_msgs, it may not send to client
+        # self.unhandled_task_msgs = []
         for t in self.threads:
             del ThreadBasedWebIOSession.thread2session[t]
             # pass