Skip to content

某些情况下用户离开无法触发defer_call/ defer_call Not Triggered for Some Situations #590

Answered by wang0618
ChemInCode asked this question in Q&A
Discussion options

You must be logged in to vote

You need add websocket_ping_interval config to tornado.web.Application:

tornado.web.Application(
        [
            (r"/", webio_handler(index)),
        ],
        websocket_ping_interval=10,
 )

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.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@wang0618
Comment options

@wang0618
Comment options

@ChemInCode
Comment options

@wang0618
Comment options

Answer selected by ChemInCode
@ChemInCode
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants