Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for SetKeepAlivesEnabled (0.21 sec)

  1. src/net/http/httptest/server.go

    // requests on this server have completed.
    func (s *Server) Close() {
    	s.mu.Lock()
    	if !s.closed {
    		s.closed = true
    		s.Listener.Close()
    		s.Config.SetKeepAlivesEnabled(false)
    		for c, st := range s.conns {
    			// Force-close any idle connections (those between
    			// requests) and new connections (those which connected
    			// but never sent a request). StateNew connections are
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:26:10 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  2. src/net/http/serve_test.go

    	}
    
    	// SetKeepAlivesEnabled should discard idle conns.
    	ts.Config.SetKeepAlivesEnabled(false)
    
    	waitCondition(t, 10*time.Millisecond, func(d time.Duration) bool {
    		if conns := tr.IdleConnStrsForTesting(); len(conns) > 0 {
    			if d > 0 {
    				t.Logf("idle conns %v after SetKeepAlivesEnabled called = %q; waiting for empty", d, conns)
    			}
    			return false
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  3. src/net/http/server.go

    func (s *Server) shuttingDown() bool {
    	return s.inShutdown.Load()
    }
    
    // SetKeepAlivesEnabled controls whether HTTP keep-alives are enabled.
    // By default, keep-alives are always enabled. Only very
    // resource-constrained environments or servers in the process of
    // shutting down should disable them.
    func (srv *Server) SetKeepAlivesEnabled(v bool) {
    	if v {
    		srv.disableKeepAlives.Store(false)
    		return
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
Back to top