Skip to content

Commit 6a67d2b

Browse files
committed
Adapt the heartbeat checker to
the configuration. In case a heartbeat less than 20 seconds the client could raise missing heart beat. In some case could disconnect the client Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
1 parent 82c7891 commit 6a67d2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/stream/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ func (c *Client) heartBeat() {
421421

422422
go func() {
423423
for c.socket.isOpen() {
424-
<-tickerHeatBeat.C
424+
<-tickerHeartbeat.C
425425
if time.Since(c.getLastHeartBeat()) > time.Duration(c.tuneState.requestedHeartbeat)*time.Second {
426426
v := atomic.AddInt32(&heartBeatMissed, 1)
427427
logs.LogWarn("Missing heart beat: %d", v)
@@ -434,7 +434,7 @@ func (c *Client) heartBeat() {
434434
}
435435

436436
}
437-
tickerHeatBeat.Stop()
437+
tickerHeartbeat.Stop()
438438
}()
439439

440440
go func() {

0 commit comments

Comments
 (0)