Skip to content

Commit

Permalink
closed chan is not an error
Browse files Browse the repository at this point in the history
  • Loading branch information
cam-schultz committed Apr 30, 2024
1 parent 3eb310f commit 74c8526
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions relayer/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,9 @@ func (lstnr *Listener) NewWarpLogInfo(log types.Log) (*relayerTypes.WarpLogInfo,
func (lstnr *Listener) ProcessLogs(ctx context.Context) error {
for {
select {
case catchUpResult := <-lstnr.catchUpResultChan:
if !catchUpResult {
case catchUpResult, ok := <-lstnr.catchUpResultChan:
// Mark the relayer as unhealthy if the catch-up process fails.
if ok && !catchUpResult {
lstnr.healthStatus.Store(false)
lstnr.logger.Error(
"Failed to catch up on historical blocks. Exiting listener goroutine.",
Expand Down

0 comments on commit 74c8526

Please # to comment.