From e39a67d5bc40fc8bccc95664b1b9d1c29fe2b441 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Fri, 31 Mar 2017 17:45:55 +0200 Subject: [PATCH] log timeout in freedom --- proxy/freedom/freedom.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxy/freedom/freedom.go b/proxy/freedom/freedom.go index 9af1fd7c5..1d01ac079 100644 --- a/proxy/freedom/freedom.go +++ b/proxy/freedom/freedom.go @@ -111,8 +111,9 @@ func (v *Handler) Process(ctx context.Context, outboundRay ray.OutboundRay, dial ctx, cancel := context.WithCancel(ctx) timeout := time.Second * time.Duration(v.timeout) if timeout == 0 { - timeout = time.Minute * 10 + timeout = time.Minute * 5 } + log.Debug("Freedom: Cancel after ", timeout) timer := signal.CancelAfterInactivity(ctx, cancel, timeout) 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 { log.Info("Freedom: Connection ending with ", err) + cancel() input.CloseError() output.CloseError() return err