- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for closeIdleConnections (0.39 sec)
-
src/net/http/httptest/server.go
if t, ok := http.DefaultTransport.(closeIdleTransport); ok { t.CloseIdleConnections() } // Also close the client idle connections. if s.client != nil { if t, ok := s.client.Transport.(closeIdleTransport); ok { t.CloseIdleConnections() } } s.wg.Wait() } func (s *Server) logCloseHangDebugInfo() { s.mu.Lock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 17:26:10 UTC 2024 - 10.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/net/http.go
// until it finds one that implements the CloseIdleConnections method. // If the Transport does not have a CloseIdleConnections method // then this function does nothing. func CloseIdleConnectionsFor(transport http.RoundTripper) { if transport == nil { return } type closeIdler interface { CloseIdleConnections() } switch transport := transport.(type) { case closeIdler:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Mar 05 00:08:58 UTC 2022 - 20.8K bytes - Viewed (0) -
pilot/pkg/bootstrap/server_test.go
stop := make(chan struct{}) g.Expect(s.Start(stop)).To(Succeed()) defer func() { close(stop) s.WaitUntilCompletion() }() t.Run("h1", func(t *testing.T) { c := http.Client{} defer c.CloseIdleConnections() resp, err := c.Get("http://" + s.httpAddr + "/validate") assert.NoError(t, err) // Validate returns 400 on no body; if we got this the request works assert.Equal(t, resp.StatusCode, 400)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 13 17:48:28 UTC 2024 - 23.1K bytes - Viewed (0) -
src/net/http/client.go
return nil, err } return c.Do(req) } // CloseIdleConnections closes any connections on its [Transport] which // were previously connected from previous requests but are now // sitting idle in a "keep-alive" state. It does not interrupt any // connections currently in use. // // If [Client.Transport] does not have a [Client.CloseIdleConnections] method // then this method does nothing.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 06:06:11 UTC 2024 - 33.7K bytes - Viewed (0) -
src/net/http/clientserver_test.go
}) } } type clientServerTest struct { t testing.TB h2 bool h Handler ts *httptest.Server tr *Transport c *Client } func (t *clientServerTest) close() { t.tr.CloseIdleConnections() t.ts.Close() } func (t *clientServerTest) getURL(u string) string { res, err := t.c.Get(u) if err != nil { t.t.Fatal(err) } defer res.Body.Close()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 46.6K bytes - Viewed (0) -
api/go1.12.txt
pkg math/bits, func Sub64(uint64, uint64, uint64) (uint64, uint64) pkg net/http, const StatusTooEarly = 425 pkg net/http, const StatusTooEarly ideal-int pkg net/http, method (*Client) CloseIdleConnections() pkg os, const ModeType = 2401763328 pkg os, func UserHomeDir() (string, error) pkg os, method (*File) SyscallConn() (syscall.RawConn, error) pkg os, method (*ProcessState) ExitCode() int
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 02 21:21:53 UTC 2019 - 13.5K bytes - Viewed (0) -
src/net/http/requestwrite_test.go
dr := &delegateReader{c: make(chan io.Reader)} t := &Transport{ Dial: func(net, addr string) (net.Conn, error) { return &dumpConn{io.MultiWriter(&buf, pw), dr}, nil }, } defer t.CloseIdleConnections() // Wait for the request before replying with a dummy response: go func() { req, err := ReadRequest(bufio.NewReader(pr)) if err == nil { if onReadHeaders != nil { onReadHeaders() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 07 01:07:32 UTC 2022 - 23.3K bytes - Viewed (0)