-
Notifications
You must be signed in to change notification settings - Fork 278
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
getty reopen sesion #239
getty reopen sesion #239
Conversation
@@ -113,8 +113,6 @@ func (g *gettyClientHandler) OnMessage(session getty.Session, pkg interface{}) { | |||
} | |||
|
|||
func (g *gettyClientHandler) OnCron(session getty.Session) { | |||
log.Debug("session{%s} Oncron executing", session.Stat()) | |||
g.transferBeatHeart(session, message.HeartBeatMessagePing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove heartbeat?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope to delay the interval between transaction submissions by means of timers in the code. The heartbeat may cause getty to disconnect and reconnect, and the time is uncontrollable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should register the branch transaction in listener#onOpen before the session is reopened
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope to delay the interval between transaction submissions by means of timers in the code. The heartbeat may cause getty to disconnect and reconnect, and the time is uncontrollable.
If the heartbeat is closed, it may cause getty to disconnect and reconnect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should register the branch transaction in listener#onOpen before the session is reopened
you mean register resource on Open?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I want to call GetResourceManager().branchRegister before registering the resource
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I want to call GetResourceManager().branchRegister before registering the resource
I don't know if I understand it right or not, in my understanding, branch transaction is regietered when a branch rpc is called, so what are you trying to say here is register resource when it's Open ?
pls fix the ci failure. |
this ci have fixed by #263 |
What this PR does:
Related to issue-128
If getty is disconnected and reconnected, the port of getty will change. It will cause tc to not find the previously registered rm service, so we need to turn off the heartbeat, and tc will not be able to find rm
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
run samples/tcc or local