Skip to content

Commit

Permalink
fix exit on error
Browse files Browse the repository at this point in the history
  • Loading branch information
rpatel3001 committed Feb 26, 2024
1 parent 3e62023 commit 7ec48f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rootfs/scripts/soapy2tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from threading import Thread, Event
from time import time, sleep
from queue import Queue, Full
from _thread import interrupt_main

def rx_thread(sdrcfg, rxStream, rxcfg, tx_init, inbufs, rxq):
prctl.set_name("rx")
Expand Down Expand Up @@ -54,7 +55,8 @@ def rx_thread(sdrcfg, rxStream, rxcfg, tx_init, inbufs, rxq):
sdr.deactivateStream(rxStream)
sdr.closeStream(rxStream)
if environ.get("EXIT_ON_ERROR"):
exit()
print("Quitting script...")
interrupt_main()
else:
return

Expand Down

0 comments on commit 7ec48f1

Please sign in to comment.