Skip to content

Commit de53eb0

Browse files
committed
session: avoid logging healthcheck error on canceled connection
Signed-off-by: Tonis Tiigi <[email protected]>
1 parent 87afda3 commit de53eb0

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)