add traffic limiter for proxy handler

This commit is contained in:
ginuerzh
2023-11-18 18:28:09 +08:00
parent 330631fd79
commit 88cc6ff4d5
38 changed files with 633 additions and 200 deletions

View File

@ -118,10 +118,10 @@ func (l *http2Listener) Close() (err error) {
case <-l.errChan:
default:
err = l.server.Close()
l.errChan <- err
l.errChan <- http.ErrServerClosed
close(l.errChan)
}
return nil
return
}
func (l *http2Listener) handleFunc(w http.ResponseWriter, r *http.Request) {