You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2021/06/30 11:11:40 UTC
[dubbo-getty] branch improve/delte-handleLoop updated: feat: change
sessionTimerLoop to heartbeat
This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a commit to branch improve/delte-handleLoop
in repository https://gitbox.apache.org/repos/asf/dubbo-getty.git
The following commit(s) were added to refs/heads/improve/delte-handleLoop by this push:
new 69cc8c6 feat: change sessionTimerLoop to heartbeat
new e4e80fb Merge pull request #64 from georgehao/improve/delte-handleLoop
69cc8c6 is described below
commit 69cc8c6fce010b0acc6e9754ba8b5f40b531c55d
Author: georgehao <ha...@gmail.com>
AuthorDate: Wed Jun 30 18:22:21 2021 +0800
feat: change sessionTimerLoop to heartbeat
---
session.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/session.go b/session.go
index 822e2a5..4fa5a02 100644
--- a/session.go
+++ b/session.go
@@ -453,7 +453,7 @@ func (s *session) WriteBytesArray(pkgs ...[]byte) (int, error) {
return wlg, nil
}
-func sessionTimerLoop(_ gxtime.TimerID, _ time.Time, arg interface{}) error {
+func heartbeat(_ gxtime.TimerID, _ time.Time, arg interface{}) error {
ss, _ := arg.(*session)
if ss == nil || ss.IsClosed() {
return ErrSessionClosed
@@ -498,7 +498,7 @@ func (s *session) run() {
}
s.grNum.Add(1)
- if _, err := defaultTimerWheel.AddTimer(sessionTimerLoop, gxtime.TimerLoop, s.period, s); err != nil {
+ if _, err := defaultTimerWheel.AddTimer(heartbeat, gxtime.TimerLoop, s.period, s); err != nil {
panic(fmt.Sprintf("failed to add session %s to defaultTimerWheel err:%v", s.Stat(), err))
}
// start read gr