Skip to content

Commit

Permalink
Remove invalid documentation
Browse files Browse the repository at this point in the history
The Timeout functions don't use separate goroutines anymore and use
normaly deadlines. Because of that requests are terminated and don't
keep running in the background as before.
  • Loading branch information
erikdubbelboer committed May 22, 2023
1 parent 9bc8e48 commit e6ce5f0
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ func Do(req *Request, resp *Response) error {
//
// It is recommended obtaining req and resp via AcquireRequest
// and AcquireResponse in performance-critical code.
//
// Warning: DoTimeout does not terminate the request itself. The request will
// continue in the background and the response will be discarded.
// If requests take too long and the connection pool gets filled up please
// try using a Client and setting a ReadTimeout.
func DoTimeout(req *Request, resp *Response, timeout time.Duration) error {
return defaultClient.DoTimeout(req, resp, timeout)
}
Expand Down Expand Up @@ -383,11 +378,6 @@ func (c *Client) Post(dst []byte, url string, postArgs *Args) (statusCode int, b
//
// It is recommended obtaining req and resp via AcquireRequest
// and AcquireResponse in performance-critical code.
//
// Warning: DoTimeout does not terminate the request itself. The request will
// continue in the background and the response will be discarded.
// If requests take too long and the connection pool gets filled up please
// try setting a ReadTimeout.
func (c *Client) DoTimeout(req *Request, resp *Response, timeout time.Duration) error {
req.timeout = timeout
if req.timeout < 0 {
Expand Down Expand Up @@ -1167,11 +1157,6 @@ func ReleaseResponse(resp *Response) {
//
// It is recommended obtaining req and resp via AcquireRequest
// and AcquireResponse in performance-critical code.
//
// Warning: DoTimeout does not terminate the request itself. The request will
// continue in the background and the response will be discarded.
// If requests take too long and the connection pool gets filled up please
// try setting a ReadTimeout.
func (c *HostClient) DoTimeout(req *Request, resp *Response, timeout time.Duration) error {
req.timeout = timeout
if req.timeout < 0 {
Expand Down Expand Up @@ -2381,11 +2366,6 @@ type pipelineWork struct {
//
// It is recommended obtaining req and resp via AcquireRequest
// and AcquireResponse in performance-critical code.
//
// Warning: DoTimeout does not terminate the request itself. The request will
// continue in the background and the response will be discarded.
// If requests take too long and the connection pool gets filled up please
// try setting a ReadTimeout.
func (c *PipelineClient) DoTimeout(req *Request, resp *Response, timeout time.Duration) error {
return c.DoDeadline(req, resp, time.Now().Add(timeout))
}
Expand Down

0 comments on commit e6ce5f0

Please sign in to comment.