Closed hgducharme closed 1 year ago
Determined that the ChallengeStreamWatcher
thread properly terminates, but the EventStreamWatcher
is not terminating
What is happening is that the EventStreamWatcher
is infinitely iterating over the event stream sent over by the lichess API. This is happening in the line for line in event_stream
where event_stream
is a python generator object, which is returned because we use response.iter_lines(stream = True)
in the API call
Fixed (hopefully) with commit c63128f85785b6fc9a7710162abdd0c2c3601abe
When shutting down the CLI, the
close_all_threads()
function tells each thread to stop and then waits for them to clean themselves up. However, the function hangs waiting to hear back from the threads. Expected behavior: the threads report back saying they're done cleaning up and the CLI continues with shutdown, exiting gracefully.