tun2: close http streams after 30 minutes
This commit is contained in:
parent
c3b786b992
commit
30f7f4636e
|
@ -127,6 +127,12 @@ func (c *Connection) RoundTrip(req *http.Request) (*http.Response, error) {
|
|||
return nil, errors.Wrap(err, ErrCantOpenSessionStream.Error())
|
||||
}
|
||||
|
||||
go func() {
|
||||
time.Sleep(30 * time.Minute)
|
||||
|
||||
stream.Close()
|
||||
}()
|
||||
|
||||
err = req.Write(stream)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, ErrCantWriteRequest.Error())
|
||||
|
|
Loading…
Reference in New Issue