فهرست منبع

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(),