-
-
Notifications
You must be signed in to change notification settings - Fork 223
Closed
Description
Closing IsoTPSocketConnection stucks on self.rxthread.join() when self.tpsock is created in blocking mode:
tpsock = isotp.socket(timeout=0)
connector = IsoTPSocketConnection(interface=interface, rxid=endpoint.tx, txid=endpoint.rx, tpsock=tpsock)
rxthread_task use directly socket.recv by self.tpsock.recv() . Is it possible to use selector?
def rxthread_task(self):
sel = selectors.DefaultSelector()
sel.register(self.tpsock, selectors.EVENT_READ, data=None)
while not self.exit_requested:
events = sel.select(timeout=1)
for _, _ in events:
try:
data = self.tpsock.recv()
if data is not None:
self.rxqueue.put(data)
except socket.timeout:
pass
except Exception:
self.exit_requested = True
Or it would be better to make some changes to isotp.socket.recv directly?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels