Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for closeIdleConnections (0.23 sec)

  1. fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/HcConnectionMonitorTarget.java

            }
    
            try {
                // Close expired connections
                clientConnectionManager.closeExpiredConnections();
                // Close idle connections
                clientConnectionManager.closeIdleConnections(idleConnectionTimeout, TimeUnit.MILLISECONDS);
            } catch (final Exception e) {
                logger.warn("A connection monitoring exception occurs.", e);
            }
        }
    
    Registered: Wed Jun 12 15:17:51 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  2. src/net/http/omithttp2.go

    type http2Transport struct {
    	MaxHeaderListSize uint32
    	ConnPool          any
    }
    
    func (*http2Transport) RoundTrip(*Request) (*Response, error) { panic(noHTTP2) }
    func (*http2Transport) CloseIdleConnections()                 {}
    
    type http2noDialH2RoundTripper struct{}
    
    func (http2noDialH2RoundTripper) RoundTrip(*Request) (*Response, error) { panic(noHTTP2) }
    
    type http2noDialClientConnPool struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 22 20:51:27 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  3. 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)
  4. src/net/http/alpn_test.go

    		certPool.AddCert(ts.Certificate())
    		tr := &Transport{
    			TLSClientConfig: &tls.Config{
    				RootCAs:    certPool,
    				NextProtos: []string{"unhandled-proto"},
    			},
    		}
    		defer tr.CloseIdleConnections()
    		c := &Client{
    			Transport: tr,
    		}
    		res, err := c.Get(ts.URL)
    		if err == nil {
    			defer res.Body.Close()
    			var buf bytes.Buffer
    			res.Write(&buf)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 20 18:41:18 UTC 2020
    - 3K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. src/net/http/main_test.go

    			return true
    		}
    	}
    	return false
    }
    
    var leakReported bool
    
    func afterTest(t testing.TB) {
    	http.DefaultTransport.(*http.Transport).CloseIdleConnections()
    	if testing.Short() {
    		return
    	}
    	if leakReported {
    		// To avoid confusion, only report the first leak of each test run.
    		// After the first leak has been reported, we can't tell whether the leaked
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 22:49:46 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  8. 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)
  9. src/net/http/transport_test.go

    	}
    
    	if e := "|http|" + ts.Listener.Addr().String(); keys[0] != e {
    		t.Errorf("Expected idle cache key %q; got %q", e, keys[0])
    	}
    
    	tr.CloseIdleConnections()
    	if e, g := 0, len(tr.IdleConnKeysForTesting()); e != g {
    		t.Errorf("After CloseIdleConnections expected %d idle conn cache keys; got %d", e, g)
    	}
    }
    
    // Tests that the HTTP transport re-uses connections when a client
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
  10. pkg/test/echo/server/forwarder/http.go

    				return newDialer(cfg).Dial(network, addr)
    			},
    		}
    	}
    	closeFn := func(conn *http2.Transport) func() {
    		return conn.CloseIdleConnections
    	}
    	noCloseFn := func() {}
    
    	if cfg.newConnectionPerRequest {
    		// Create a new transport (i.e. connection) for each request.
    		return func() (http.RoundTripper, func(), error) {
    			conn := newConn()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 13:56:46 UTC 2024
    - 7.9K bytes
    - Viewed (0)
Back to top