3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

auto-t: hlrauc.py: remove unix socket on cleanup

This commit is contained in:
James Prestwood 2021-02-25 14:00:51 -08:00 committed by Denis Kenzior
parent 904238b6ec
commit 0e13c8d32b

View File

@ -12,6 +12,7 @@ class AuthCenter:
hostapd can communicate with to obtain SIM values.
'''
def __init__(self, sock_path, config_file):
self._sock_path = sock_path
self._read_config(config_file)
self._socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
if os.path.exists(sock_path):
@ -25,6 +26,10 @@ class AuthCenter:
# wait for rx thread to start
self._rxhandle.ready.wait()
def __del__(self):
os.remove(self._sock_path)
self._socket.close()
def _rx_thread(self):
self._rxhandle.ready.set()
while (True):