fix nil ctx

This commit is contained in:
Sergey Cherepanov 2023-01-15 18:23:46 +03:00 committed by Mikhail Iudin
parent 61b9c03aad
commit 5855742497
No known key found for this signature in database
GPG Key ID: FAAAA8BAABDFF1C0

View File

@ -66,7 +66,7 @@ func (s *BaseDrpcServer) serve(ctx context.Context, lis secureservice.ContextLis
return
default:
}
ctx, conn, err := lis.Accept(ctx)
cctx, conn, err := lis.Accept(ctx)
if err != nil {
if isTemporary(err) {
l.Debug("listener temporary accept error", zap.Error(err))
@ -85,7 +85,7 @@ func (s *BaseDrpcServer) serve(ctx context.Context, lis secureservice.ContextLis
l.Error("listener accept error", zap.Error(err))
return
}
go s.serveConn(ctx, conn)
go s.serveConn(cctx, conn)
}
}