Skip to content

Commit

Permalink
Merge pull request #5969 from mysteriumnetwork/shaper-fix
Browse files Browse the repository at this point in the history
Convert bandwidth limits from Kbytes to Kbits
  • Loading branch information
tzununbekov authored Feb 12, 2024
2 parents a0bf5b1 + 6a72d9c commit c58d807
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/shaper/shaper_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ func (s *linuxShaper) Start(interfaceName string) error {
s.ws.Clear(interfaceName)

if config.GetBool(config.FlagShaperEnabled) {
err := s.ws.LimitDownlink(interfaceName, int(config.GetUInt64(config.FlagShaperBandwidth)))
err := s.ws.LimitDownlink(interfaceName, int(config.GetUInt64(config.FlagShaperBandwidth))*8)
if err != nil {
log.Error().Err(err).Msg("Could not limit download speed")
return err
}
err = s.ws.LimitUplink(interfaceName, int(config.GetUInt64(config.FlagShaperBandwidth)))
err = s.ws.LimitUplink(interfaceName, int(config.GetUInt64(config.FlagShaperBandwidth))*8)
if err != nil {
log.Error().Err(err).Msg("Could not limit upload speed")
return err
Expand Down

0 comments on commit c58d807

Please sign in to comment.