This commit is contained in:
Simon Ser 2020-08-20 09:13:56 +02:00
parent a27e5ea92e
commit e523deb15c
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
2 changed files with 6 additions and 6 deletions

10
conn.go
View File

@ -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
}

View File

@ -164,7 +164,7 @@ func connectToUpstream(network *network) (*upstreamConn, error) {
}
options := connOptions{
Logger: logger,
Logger: logger,
RateLimitDelay: upstreamMessageDelay,
RateLimitBurst: upstreamMessageBurst,
}