Explorar o código

fix: always call cancel func

A1lo %!s(int64=2) %!d(string=hai) anos
pai
achega
beec73e12d
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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(),