Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestServerShutdownThenServe (0.29 sec)

  1. src/net/http/serve_test.go

    	nclose := atomic.LoadInt32(&cl.closes)
    	if nclose != 1 {
    		t.Errorf("Close calls = %v; want 1", nclose)
    	}
    }
    
    // Issue 20239: don't block in Serve if Shutdown is called first.
    func TestServerShutdownThenServe(t *testing.T) {
    	var srv Server
    	cl := &countCloseListener{Listener: nil}
    	srv.Shutdown(context.Background())
    	got := srv.Serve(cl)
    	if got != ErrServerClosed {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
Back to top