Browse Source

fix http session closing issue

wangweimin 2 years ago
parent
commit
bd1ed421c3
2 changed files with 3 additions and 3 deletions
  1. 2 2
      pywebio/__version__.py
  2. 1 1
      pywebio/platform/adaptor/http.py

+ 2 - 2
pywebio/__version__.py

@@ -1,8 +1,8 @@
 __package__ = 'pywebio'
 __description__ = 'Write interactive web app in script way.'
 __url__ = 'https://pywebio.readthedocs.io'
-__version__ = "1.7.0"
-__version_info__ = (1, 7, 0, 0)
+__version__ = "1.7.1"
+__version_info__ = (1, 7, 1, 0)
 __author__ = 'WangWeimin'
 __author_email__ = 'wang0.618@qq.com'
 __license__ = 'MIT'

+ 1 - 1
pywebio/platform/adaptor/http.py

@@ -267,7 +267,7 @@ class HttpHandler:
             cls._webio_sessions[webio_session_id] = webio_session
             yield type(self).WAIT_MS_ON_POST / 1000.0  # <--- <--- <--- <--- <--- <--- <--- <--- <--- <--- <--- <---
         elif request_headers['webio-session-id'] not in cls._webio_sessions:  # WebIOSession deleted
-            context.set_content([dict(command='close_session')], json_type=True)
+            context.set_content(dict(commands=[dict(command='close_session')]), json_type=True)
             return context.get_response()
         else:
             webio_session_id = request_headers['webio-session-id']