fix p2p switch FlushThrottle value (#2569)

This commit is contained in:
goolAdapter 2018-10-08 14:05:12 +08:00 committed by Anton Kaliaev
parent 1d8348d707
commit 5f88fe0e9b
2 changed files with 2 additions and 1 deletions

View File

@ -48,3 +48,4 @@ timeoutPrecommit before starting next round
- [common/bit_array] Fixed a bug in the `Or` function
- [common/bit_array] Fixed a bug in the `Sub` function (@bradyjoestar)
- [common] \#2534 make bit array's PickRandom choose uniformly from true bits
- [p2p] \#2555 fix p2p switch FlushThrottle value (@goolAdapter)

View File

@ -103,7 +103,7 @@ func NewSwitch(
sw.rng = cmn.NewRand()
mConfig := conn.DefaultMConnConfig()
mConfig.FlushThrottle = time.Duration(cfg.FlushThrottleTimeout) * time.Millisecond
mConfig.FlushThrottle = cfg.FlushThrottleTimeout
mConfig.SendRate = cfg.SendRate
mConfig.RecvRate = cfg.RecvRate
mConfig.MaxPacketMsgPayloadSize = cfg.MaxPacketMsgPayloadSize