internal/tun2: wait, go has contexts
This commit is contained in:
parent
ae2f5ca097
commit
7106209616
|
@ -130,7 +130,7 @@ func (c *Connection) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
time.Sleep(30 * time.Minute)
|
<-req.Context().Done()
|
||||||
stream.Close()
|
stream.Close()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue