From c1f8899806643cafdc2e94681d1d588917f6af81 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sun, 1 Oct 2017 08:42:44 -0700 Subject: [PATCH] tun2: close streams less aggressively --- internal/tun2/connection.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/tun2/connection.go b/internal/tun2/connection.go index ae2d646..4d16d4d 100644 --- a/internal/tun2/connection.go +++ b/internal/tun2/connection.go @@ -125,7 +125,10 @@ func (c *Connection) RoundTrip(req *http.Request) (*http.Response, error) { if err != nil { return nil, errors.Wrap(err, ErrCantOpenSessionStream.Error()) } - defer stream.Close() + defer func() { + time.Sleep(5 * time.Minute) + stream.Close() + }() err = req.Write(stream) if err != nil {