Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

超时断开逻辑是不是有问题? #38

Closed
baoqp opened this issue May 11, 2023 · 1 comment
Closed

超时断开逻辑是不是有问题? #38

baoqp opened this issue May 11, 2023 · 1 comment

Comments

@baoqp
Copy link

baoqp commented May 11, 2023

server在poll到连接新的事件时,貌似没有更新连接的超时时间。

@YukunJ
Copy link
Owner

YukunJ commented May 11, 2023

Thanks for pointing this out. Indeed I think I forgot to refresh the timer for a client connection when new messages arrive.

I have cooked up a patch here for your reference. [commits]

I hooked the refresh functionality together with customer-provided handler function, so that when a new event arrives for a client connection, the first thing it does is to refresh its timer.

And thanks your observation, I even find a subtle lifecycle race problem as in #39.

@YukunJ YukunJ closed this as completed May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants