fix: locking session object instance while session.Run

This commit is contained in:
evilsocket 2019-02-24 22:22:22 +01:00
commit d5016bc506
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
2 changed files with 11 additions and 0 deletions

View file

@ -27,6 +27,9 @@ func NewAccessPoint(essid, bssid string, frequency int, rssi int8) *AccessPoint
}
func (ap *AccessPoint) MarshalJSON() ([]byte, error) {
ap.Lock()
defer ap.Unlock()
doc := apJSON{
Station: ap.Station,
Clients: make([]*Station, 0),