Skip to content

Commit

Permalink
[Batcher] Reset Timer instead of stopping function (#429)
Browse files Browse the repository at this point in the history
Co-authored-by: Siddharth More <Siddhi More>
  • Loading branch information
siddimore authored Apr 2, 2024
1 parent b94604e commit 12efb9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions disperser/cmd/batcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,10 @@ func heartbeatMonitor(filePath string, maxStallDuration time.Duration) {
stallTimer.Reset(maxStallDuration) // Reset timer on new heartbeat

case <-stallTimer.C:
log.Println("No heartbeat received within max stall duration, stopping health probe")
return
// Instead of stopping the function, log a warning
log.Println("Warning: No heartbeat received within max stall duration.")
// Reset the timer to continue monitoring
stallTimer.Reset(maxStallDuration)
}
}
}

0 comments on commit 12efb9d

Please sign in to comment.