Skip to content

Commit

Permalink
fix: always call cancel func
Browse files Browse the repository at this point in the history
  • Loading branch information
yin1999 authored and xiaokangwang committed Feb 6, 2023
1 parent 4f2fc72 commit beec73e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/log/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit beec73e

Please sign in to comment.