Pārlūkot izejas kodu

fix: always call cancel func

A1lo 2 gadi atpakaļ
vecāks
revīzija
beec73e12d
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      app/log/command/command.go

+ 1 - 0
app/log/command/command.go

@@ -44,6 +44,7 @@ func (s *LoggerServer) FollowLog(_ *FollowLogRequest, stream LoggerService_Follo
 		return newError("logger not support following")
 	}
 	ctx, cancel := context.WithCancel(stream.Context())
+	defer cancel()
 	f := func(msg cmlog.Message) {
 		err := stream.Send(&FollowLogResponse{
 			Message: msg.String(),