fix: using sync.Map to avoid race conditions on the packets.Queue

This commit is contained in:
evilsocket 2019-03-17 13:12:31 +01:00
commit 64a5ce2b58
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
4 changed files with 34 additions and 71 deletions

View file

@ -296,9 +296,6 @@ func (mod *WiFiModule) colNames(nrows int) []string {
}
func (mod *WiFiModule) showStatusBar() {
mod.Session.Queue.Stats.RLock()
defer mod.Session.Queue.Stats.RUnlock()
parts := []string{
fmt.Sprintf("%s (ch. %d)", mod.iface.Name(), network.GetInterfaceChannel(mod.iface.Name())),
fmt.Sprintf("%s %s", tui.Red("↑"), humanize.Bytes(mod.Session.Queue.Stats.Sent)),