Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Commit 0d89bad

Browse files
authored
Fix missing heartbeat lastSend
1 parent ba721ae commit 0d89bad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

wsapi.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ func (wh *wsHeartBeater) Run(interval time.Duration) {
174174
}
175175

176176
func (wh *wsHeartBeater) SendBeat() {
177+
wh.Lock()
178+
wh.lastSend = time.Now()
179+
wh.Unlock()
180+
177181
seq := atomic.LoadInt64(wh.sequence)
178182

179183
wh.writer.Queue(&outgoingEvent{

0 commit comments

Comments
 (0)