Skip to content

Commit

Permalink
fix:Reclaim the heartbeat response message to avoid memory leakage of…
Browse files Browse the repository at this point in the history
… GettyRemoting.futures (#665)

* fix:回收心跳response消息,以避免GettyRemoting.futures内存泄露

* remove chinese comment

---------

Co-authored-by: tanzegen <[email protected]>
Co-authored-by: Xin Wang <[email protected]>
  • Loading branch information
3 people authored Dec 21, 2024
1 parent 8ce1006 commit cd8588e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/remoting/processor/client/client_heart_beat_processon.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,9 @@ func (f *clientHeartBeatProcessor) Process(ctx context.Context, rpcMessage messa
log.Debug("received PONG from {}", ctx)
}
}
msgFuture := getty.GetGettyRemotingInstance().GetMessageFuture(rpcMessage.ID)

Check failure on line 41 in pkg/remoting/processor/client/client_heart_beat_processon.go

View workflow job for this annotation

GitHub Actions / build (1.18)

GetGettyRemotingInstance not declared by package getty (typecheck)
if msgFuture != nil {
getty.GetGettyRemotingInstance().RemoveMessageFuture(rpcMessage.ID)

Check failure on line 43 in pkg/remoting/processor/client/client_heart_beat_processon.go

View workflow job for this annotation

GitHub Actions / build (1.18)

GetGettyRemotingInstance not declared by package getty (typecheck)
}
return nil
}

0 comments on commit cd8588e

Please sign in to comment.