diff --git a/mn_wifi/link.py b/mn_wifi/link.py index ea56f4cef..1753be4d1 100644 --- a/mn_wifi/link.py +++ b/mn_wifi/link.py @@ -431,7 +431,8 @@ def setDisconnected(self, ap_intf): self.rssi = 0 self.channel = 0 self.associatedTo = None - ap_intf.associatedStations.remove(self) + if self in ap_intf.associatedStations: + ap_intf.associatedStations.remove(self) def wep_connect(self, passwd, ap_intf): self.iwdev_pexec('{} connect {} key d:0:{}'.format(