- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for closeIdleConnections (0.19 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) -
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)