소스 검색

fix: always call cancel func

A1lo 2 년 전
부모
커밋
beec73e12d
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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(),