mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 10:08:15 -05:00
log timeout in freedom
This commit is contained in:
parent
00822812d4
commit
e39a67d5bc
@ -111,8 +111,9 @@ func (v *Handler) Process(ctx context.Context, outboundRay ray.OutboundRay, dial
|
|||||||
ctx, cancel := context.WithCancel(ctx)
|
ctx, cancel := context.WithCancel(ctx)
|
||||||
timeout := time.Second * time.Duration(v.timeout)
|
timeout := time.Second * time.Duration(v.timeout)
|
||||||
if timeout == 0 {
|
if timeout == 0 {
|
||||||
timeout = time.Minute * 10
|
timeout = time.Minute * 5
|
||||||
}
|
}
|
||||||
|
log.Debug("Freedom: Cancel after ", timeout)
|
||||||
timer := signal.CancelAfterInactivity(ctx, cancel, timeout)
|
timer := signal.CancelAfterInactivity(ctx, cancel, timeout)
|
||||||
|
|
||||||
requestDone := signal.ExecuteAsync(func() error {
|
requestDone := signal.ExecuteAsync(func() error {
|
||||||
@ -135,6 +136,7 @@ func (v *Handler) Process(ctx context.Context, outboundRay ray.OutboundRay, dial
|
|||||||
|
|
||||||
if err := signal.ErrorOrFinish2(ctx, requestDone, responseDone); err != nil {
|
if err := signal.ErrorOrFinish2(ctx, requestDone, responseDone); err != nil {
|
||||||
log.Info("Freedom: Connection ending with ", err)
|
log.Info("Freedom: Connection ending with ", err)
|
||||||
|
cancel()
|
||||||
input.CloseError()
|
input.CloseError()
|
||||||
output.CloseError()
|
output.CloseError()
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user