mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-24 16:28:23 -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):
|
||||
if not self.attached:
|
||||
return None
|
||||
if self.s.fileno() == -1:
|
||||
self.attached = False
|
||||
return None
|
||||
while self.pending():
|
||||
ev = self.recv()
|
||||
res = self.request("DETACH")
|
||||
|
Loading…
Reference in New Issue
Block a user