We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b36d010 commit baaa9a4Copy full SHA for baaa9a4
pkg/remote/trans/nphttp2/server_handler.go
@@ -391,11 +391,15 @@ func (t *svrTransHandler) SetPipeline(p *remote.TransPipeline) {
391
}
392
393
func (t *svrTransHandler) GracefulShutdown(ctx context.Context) error {
394
+ t.mu.Lock()
395
+ if t.li.Len() == 0 {
396
+ t.mu.Unlock()
397
+ return nil
398
+ }
399
klog.Info("KITEX: gRPC GracefulShutdown starts")
400
defer func() {
401
klog.Info("KITEX: gRPC GracefulShutdown ends")
402
}()
- t.mu.Lock()
403
for elem := t.li.Front(); elem != nil; elem = elem.Next() {
404
svrTrans := elem.Value.(*SvrTrans)
405
svrTrans.tr.Drain()
0 commit comments