mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
wpaspy: Be a bit more careful on detaching the control interface
Check that the client socket is still open before trying to detach the control interface to avoid undesired exceptions on cleanup paths on unexpected errors due to the socket getting closed. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
8019033fc5
commit
30885edb7e
@ -113,6 +113,9 @@ class Ctrl:
|
|||||||
def detach(self):
|
def detach(self):
|
||||||
if not self.attached:
|
if not self.attached:
|
||||||
return None
|
return None
|
||||||
|
if self.s.fileno() == -1:
|
||||||
|
self.attached = False
|
||||||
|
return None
|
||||||
while self.pending():
|
while self.pending():
|
||||||
ev = self.recv()
|
ev = self.recv()
|
||||||
res = self.request("DETACH")
|
res = self.request("DETACH")
|
||||||
|
Loading…
Reference in New Issue
Block a user