mirror of
https://github.com/romanz/amodem.git
synced 2026-03-17 23:26:01 +08:00
It seems that Mac OS does not support calling socket.shutdown(socket.SHUT_RD) on a listening socket (see https://github.com/romanz/trezor-agent/issues/6). The following implementation will set the accept() timeout to 0.1s and stop the server if a threading.Event (named "quit_event") is set by the main thread.