Selaa lähdekoodia

fix ThreadBasedWebIOSession msg lost when session close bug

wangweimin 5 vuotta sitten
vanhempi
säilyke
1e208d4115
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  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