-
Couldn't load subscription status.
- Fork 42
Open
Description
I am trying to create a threaded app that can stop each thread upon CTRL-C, and would like to set a timeout on consumer select.select to check if the app should quit or not. When I set blocking=False in consumer setup, I get nothing but resource not available errors.
Source:
I edited the source to not include my callsign and password
import aprslib
import logging
def callback(packet):
try:
packet = aprslib.parse(packet)
print(packet)
except (aprslib.ParseError, aprslib.UnknownFormat) as exp:
pass
logging.basicConfig(level=logging.INFO) # level=10
AIS = aprslib.IS("<MY ACCOUNT HERE>", passwd="<MY PASSWORD HERE>", port=14580, host="rotate.aprs2.net")
AIS.connect()
AIS.consumer(callback, raw=True, blocking=False, immortal=True)
The output
INFO:aprslib.inet.IS:Attempting connection to rotate.aprs2.net:14580
INFO:aprslib.inet.IS:Connected to ('62.77.224.245', 14580)
INFO:aprslib.inet.IS:Sending login information
INFO:aprslib.inet.IS:Login successful
ERROR:aprslib.inet.IS:socket error on recv(): [Errno 11] Resource temporarily unavailable
Metadata
Metadata
Assignees
Labels
No labels