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

feat: remove session when send heart beat message failed #738

Merged
merged 11 commits into from
Dec 14, 2024

Conversation

No-SilverBullet
Copy link
Contributor

What this PR does:
close session when send heart beat message failed
Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@@ -115,18 +115,22 @@ 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)
err := g.transferHeartBeat(session, message.HeartBeatMessagePing)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里要设置失败的心跳次数吗?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

跟进 issue:#740

@@ -115,18 +115,22 @@ 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)
err := g.transferHeartBeat(session, message.HeartBeatMessagePing)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

跟进 issue:#740

@luky116 luky116 merged commit 1d1214d into apache:master Dec 14, 2024
7 checks passed
@slievrly slievrly added this to the 2.0.0 milestone Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants