diff --git a/internal/tun2/connection.go b/internal/tun2/connection.go index 26851ce..d462909 100644 --- a/internal/tun2/connection.go +++ b/internal/tun2/connection.go @@ -128,7 +128,11 @@ func (c *Connection) RoundTrip(req *http.Request) (*http.Response, error) { if err != nil { return nil, errors.Wrap(err, ErrCantOpenSessionStream.Error()) } - defer stream.Close() + + go func() { + time.Sleep(30 * time.Minute) + stream.Close() + }() err = req.Write(stream) if err != nil {