diff --git a/conn.go b/conn.go index 7a6c63b..6914179 100644 --- a/conn.go +++ b/conn.go @@ -107,8 +107,8 @@ func (wa websocketAddr) String() string { } type rateLimiter struct { - C <-chan struct{} - ticker *time.Ticker + C <-chan struct{} + ticker *time.Ticker stopped chan struct{} } @@ -135,8 +135,8 @@ func newRateLimiter(delay time.Duration, burst int) *rateLimiter { } }() return &rateLimiter{ - C: ch, - ticker: ticker, + C: ch, + ticker: ticker, stopped: stopped, } } @@ -147,7 +147,7 @@ func (rl *rateLimiter) Stop() { } type connOptions struct { - Logger Logger + Logger Logger RateLimitDelay time.Duration RateLimitBurst int } diff --git a/upstream.go b/upstream.go index 4ec704d..2faec49 100644 --- a/upstream.go +++ b/upstream.go @@ -164,7 +164,7 @@ func connectToUpstream(network *network) (*upstreamConn, error) { } options := connOptions{ - Logger: logger, + Logger: logger, RateLimitDelay: upstreamMessageDelay, RateLimitBurst: upstreamMessageBurst, }