Ver Fonte

fix ThreadBasedWebIOSession msg lost when session close bug

wangweimin há 5 anos atrás
pai
commit
1e208d4115
1 ficheiros alterados com 2 adições e 1 exclusões
  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