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

NodeServer中的KeepAlive判断错误导致启动多个相同进程 #94

Open
flamefox opened this issue Mar 17, 2021 · 1 comment
Open

Comments

@flamefox
Copy link
Contributor

if ((TNOW - _runTime) < (ServantHandle::HEART_BEAT_INTERVAL + 1))

这里判断使用的是KeepAliveThread的启动时间而不是具体的ServerObject的心跳时间
当具体的服务进程通过async_keepalive反馈自身信息时,就有可能没法满足这个条件,导致进程被重复启动.

似乎可以变成这样的代码就ok了?猜测这样,还没完成自测

if ((TNOW - pServerObjectPtr->getLastKeepAliveTime()) < (ServantHandle::HEART_BEAT_INTERVAL + 1))
@tarscloudbot
Copy link
Contributor

欢迎pr~

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