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

pinus mqtt心跳超时的解决 #137

Merged
merged 1 commit into from
Aug 20, 2020

Conversation

s8642795130
Copy link
Contributor

mqtt的心跳检测在pingreq之后,在windows操作系统的某些极端情况下由于异步的原因,会立刻收到pong,导致ping的时间竟然在pong之后,此时checkAlive函数还在等待pong消息,但此时已经收到返回了,所以一直都等不到,所以会超时。解决方法就是在ping之后第一次检测超时的时候补发一次ping,但不更新时间,此时就会收到新的pong消息,不会让进程被移除

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

Successfully merging this pull request may close these issues.

None yet

2 participants