Skip to content

Commit 57a029f

Browse files
authored
Merge pull request moby#3882 from tonistiigi/healthcheck-log-fix
session: avoid logging healthcheck error on canceled connection
2 parents f76c784 + de53eb0 commit 57a029f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

session/grpc.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ func monitorHealth(ctx context.Context, cc *grpc.ClientConn, cancelConn func())
112112
}
113113

114114
if err != nil {
115+
select {
116+
case <-ctx.Done():
117+
return
118+
default:
119+
}
115120
if failedBefore {
116121
bklog.G(ctx).Error("healthcheck failed fatally")
117122
return

0 commit comments

Comments
 (0)