new: wifi.min.rssi, wifi.ap.ttl and wifi.sta.ttl changes are now applied in realtime

This commit is contained in:
evilsocket 2019-09-15 15:10:56 +02:00
commit 12a11ef19d
No known key found for this signature in database
GPG key ID: 82E42E7F3B34C97E
5 changed files with 47 additions and 9 deletions

View file

@ -87,11 +87,12 @@ func (env *Environment) WithCallback(name, value string, cb EnvironmentChangedCa
func (env *Environment) Set(name, value string) string {
env.Lock()
defer env.Unlock()
old := env.Data[name]
env.Data[name] = value
env.Unlock()
if cb, hasCallback := env.cbs[name]; hasCallback {
cb(value)
}