Skip to content

Commit 06217af

Browse files
committed
fix incomplete clean-up in threadbased session
1 parent b84168d commit 06217af

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pywebio/session/threadbased.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ def _cleanup(self, nonblock=False):
183183
# so the `get_current_session()` call in those thread will raise SessionNotFoundException
184184
del cls.thread2session[id(t)]
185185

186+
if self.callback_thread:
187+
del cls.thread2session[id(self.callback_thread)]
188+
186189
def try_best_to_add_item_to_mq(mq, item, try_count=10):
187190
for _ in range(try_count):
188191
try:

0 commit comments

Comments
 (0)