boo
parent
f71295b40f
commit
d810796e32
|
|
@ -3,7 +3,6 @@ package main
|
|||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
|
@ -16,7 +15,6 @@ type throttledWriter struct {
|
|||
|
||||
func (tw throttledWriter) Write(b []byte) (int, error) {
|
||||
if tw.limiter != nil {
|
||||
start := time.Now()
|
||||
if block := tw.limiter.Burst(); len(b) > block {
|
||||
b = b[:block]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue