aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2023-05-22 16:27:56 +0200
committerGravatar Erik Dubbelboer <erik@dubbelboer.com> 2023-05-22 16:27:56 +0200
commite6ce5f0b11be319e9ac0c5090cf0c9f76ebb828a (patch)
treee460e1fe791d5362a412ab9b5395f8e3e8f98b9e /client.go
parentRequest timeout settings for the same domain name are reused (#1558) (diff)
downloadfasthttp-e6ce5f0b11be319e9ac0c5090cf0c9f76ebb828a.tar.gz
fasthttp-e6ce5f0b11be319e9ac0c5090cf0c9f76ebb828a.tar.bz2
fasthttp-e6ce5f0b11be319e9ac0c5090cf0c9f76ebb828a.zip
Remove invalid documentation
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.
Diffstat (limited to 'client.go')
-rw-r--r--client.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/client.go b/client.go
index 6069eea..e47d4be 100644
--- a/client.go
+++ b/client.go
@@ -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)
}
@@ -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 {
@@ -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 {
@@ -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))
}