某些情况下用户离开无法触发defer_call/ defer_call Not Triggered for Some Situations #590
-
亲爱的wang0618, 祝您一切顺利。我想咨询一下我们的一些用户在访问我们的pywebio应用程序时偶尔遇到的问题。他们偶尔会遇到 tornado.websocket.WebSocketClosedError,这导致无法触发 defer_call。 根据我的观察,我猜测这个问题可能与用户离开应用的方式有关,如果用户在断开网络连接后关闭或刷新浏览器页面,则无法触发 defer_call。 如果您能友好地帮助我找到解决这个问题的办法,我将不胜感激。如果有任何建议或修复措施,请告知我们,这将有助于用户能够更加顺利地使用我们的应用。 非常感谢您的关注和支持。期待您宝贵的指导。 此致, Dear Wang0618, I hope this message finds you well. I would like to inquire about an occasional issue that some of our users are experiencing while accessing our pywebio application. It seems that they are encountering a tornado.websocket.WebSocketClosedError, which is preventing the defer_call from being triggered. Based on my observations, I suspect that this issue might be related to the way users are leaving the application, specifically when they close or refresh the browser page. If a user closes or refreshes the browser page after disconnecting their internet connection, the defer_call does not get triggered. I would greatly appreciate it if you could kindly assist me in finding a solution to this matter. If there are any suggested steps or fixes, please let me know, as it would be of great help to ensure a smoother experience for our users. Thank you very much for your attention and support. Looking forward to your valuable guidance. Best regards, Traceback (most recent call last): |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
Beta Was this translation helpful? Give feedback.
You need add
websocket_ping_interval
config totornado.web.Application
:Accroding to tornado's doc, it enable tornado to detect if the websocket has failed without being properly closed.
If you use
start_server()
to start your pywebio app, pywebio will add this parameter to tornado for you.