fix: always call cancel func

This commit is contained in:
A1lo
2023-02-06 20:15:54 +00:00
committed by Shelikhoo
parent 4f2fc729ce
commit beec73e12d
+1
View File
@@ -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(),