File tree 1 file changed +1
-16
lines changed
1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -2806,9 +2806,6 @@ func (srv *Server) Serve(l net.Listener) error {
2806
2806
return err
2807
2807
}
2808
2808
2809
- serveDone := make (chan struct {})
2810
- defer close (serveDone )
2811
-
2812
2809
if ! srv .trackListener (& l , true ) {
2813
2810
return ErrServerClosed
2814
2811
}
@@ -2910,11 +2907,6 @@ func (s *Server) trackListener(ln *net.Listener, add bool) bool {
2910
2907
if s .shuttingDown () {
2911
2908
return false
2912
2909
}
2913
- // If the *Server is being reused after a previous
2914
- // Close or Shutdown, reset its doneChan:
2915
- if len (s .listeners ) == 0 && len (s .activeConn ) == 0 {
2916
- s .doneChan = nil
2917
- }
2918
2910
s .listeners [ln ] = struct {}{}
2919
2911
} else {
2920
2912
delete (s .listeners , ln )
@@ -2973,14 +2965,7 @@ func (srv *Server) SetKeepAlivesEnabled(v bool) {
2973
2965
// Close idle HTTP/1 conns:
2974
2966
srv .closeIdleConns ()
2975
2967
2976
- // Close HTTP/2 conns, as soon as they become idle, but reset
2977
- // the chan so future conns (if the listener is still active)
2978
- // still work and don't get a GOAWAY immediately, before their
2979
- // first request:
2980
- srv .mu .Lock ()
2981
- defer srv .mu .Unlock ()
2982
- srv .closeDoneChanLocked () // closes http2 conns
2983
- srv .doneChan = nil
2968
+ // TODO: Issue 26303: close HTTP/2 conns as soon as they become idle.
2984
2969
}
2985
2970
2986
2971
func (s * Server ) logf (format string , args ... interface {}) {
You can’t perform that action at this time.
0 commit comments