Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions node/pkg/common/scissors.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,12 @@ func StartRunnable(ctx context.Context, errC chan error, catchPanics bool, name
default:
err = fmt.Errorf("%s: %v", name, x)
}
ScissorsPanicsCaught.WithLabelValues(name).Inc()
// We don't want this to hang if the listener has already gone away.
select {
case errC <- err: // Note on channel capacity: intentional best-effort: silently drop if the listener has already gone away
default:
}
ScissorsPanicsCaught.WithLabelValues(name).Inc()

}
}()
}
Expand All @@ -83,11 +82,11 @@ func StartRunnable(ctx context.Context, errC chan error, catchPanics bool, name
func startRunnable(ctx context.Context, errC chan error, name string, runnable supervisor.Runnable) {
err := runnable(ctx)
if err != nil {
ScissorsErrorsCaught.WithLabelValues(name).Inc()
// We don't want this to hang if the listener has already gone away.
select {
case errC <- err: // Note on channel capacity: intentional best-effort: silently drop if the listener has already gone away
default:
}
ScissorsErrorsCaught.WithLabelValues(name).Inc()
}
}
Loading