Skip to content

Commit

Permalink
Rate imit boot socket to 160 packets/sec with a burst of 8.
Browse files Browse the repository at this point in the history
  • Loading branch information
lthibault committed Nov 19, 2022
1 parent d859935 commit 31f83fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/runtime/discover.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (c Config) newServerDisc(env Env, lx fx.Lifecycle, vat casm.Vat) (d discove

d, err = bootutil.ListenString(vat.Host, env.String("discover"),
socket.WithLogger(env.Log()),
socket.WithRateLimiter(socket.NewPacketLimiter(10000, 8)))
socket.WithRateLimiter(socket.NewPacketLimiter(160, 8)))
if c, ok := d.(io.Closer); ok {
lx.Append(closer(c))
}
Expand All @@ -55,7 +55,7 @@ func (c Config) newClientDisc(env Env, lx fx.Lifecycle, vat casm.Vat) (d discove

d, err = bootutil.DialString(vat.Host, env.String("discover"),
socket.WithLogger(env.Log()),
socket.WithRateLimiter(socket.NewPacketLimiter(10000, 8)))
socket.WithRateLimiter(socket.NewPacketLimiter(160, 8)))
if c, ok := d.(io.Closer); ok {
lx.Append(closer(c))
}
Expand Down

0 comments on commit 31f83fe

Please sign in to comment.