From 7106209616d6b72a2b7f4dc42f924509d6e7aebd Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Tue, 12 Dec 2017 10:21:38 -0800 Subject: [PATCH] internal/tun2: wait, go has contexts --- internal/tun2/connection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/tun2/connection.go b/internal/tun2/connection.go index d462909..1b43d6f 100644 --- a/internal/tun2/connection.go +++ b/internal/tun2/connection.go @@ -130,7 +130,7 @@ func (c *Connection) RoundTrip(req *http.Request) (*http.Response, error) { } go func() { - time.Sleep(30 * time.Minute) + <-req.Context().Done() stream.Close() }()