nolog
parent
0918fe57dc
commit
f71295b40f
|
|
@ -32,7 +32,7 @@ func NewServer(c *Config) *Server {
|
|||
}
|
||||
|
||||
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
log.Println(r.Method, r.Host)
|
||||
//log.Println(r.Method, r.Host)
|
||||
switch r.Method {
|
||||
case http.MethodConnect:
|
||||
s.Connect(w, r)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package main
|
|||
import (
|
||||
"context"
|
||||
"io"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"golang.org/x/time/rate"
|
||||
|
|
@ -24,7 +23,6 @@ func (tw throttledWriter) Write(b []byte) (int, error) {
|
|||
if err := tw.limiter.WaitN(tw.ctx, len(b)); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
log.Printf("limited %v bytes for %v", len(b), time.Since(start))
|
||||
}
|
||||
return tw.w.Write(b)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue