fix:如果客户端时间大于服务端时间,客户端不存在,也不会超时 #1007
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
分布式环境、容器环境、研发测试环境,很难做到每台服务器时间是100%同步的,当客户端时间远远大于服务器时间时,不管客户端是不是存在,会导致服务端判断客户端的心跳一直存在。最好是基于服务端本身的时间来做判断,这样判断更精确一些。
我们基于此逻辑修改后,已用于生产部署,目前运行一切正常。
Brief changelog
It is best to associate an existing issue
Verifying this change
Do I need to test?
Has testing been completed?
Test method?
Follow this checklist to help us incorporate your contribution quickly and easily. Notice,
it would be helpful if you could finish the following 3 checklist before request the community to review your PR.