mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-03 07:56:42 -05:00
fix: always call cancel func
This commit is contained in:
parent
4f2fc729ce
commit
beec73e12d
@ -44,6 +44,7 @@ func (s *LoggerServer) FollowLog(_ *FollowLogRequest, stream LoggerService_Follo
|
|||||||
return newError("logger not support following")
|
return newError("logger not support following")
|
||||||
}
|
}
|
||||||
ctx, cancel := context.WithCancel(stream.Context())
|
ctx, cancel := context.WithCancel(stream.Context())
|
||||||
|
defer cancel()
|
||||||
f := func(msg cmlog.Message) {
|
f := func(msg cmlog.Message) {
|
||||||
err := stream.Send(&FollowLogResponse{
|
err := stream.Send(&FollowLogResponse{
|
||||||
Message: msg.String(),
|
Message: msg.String(),
|
||||||
|
Loading…
Reference in New Issue
Block a user