Fixes #34248
Add is_running() check in NetworkThread.close() to prevent timeout when event loop is already stopped on NetBSD.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34334.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process. A summary of reviews will appear here.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
why would it already be closed, and why would the check help anything to improve the situation?
I think the problem is not that it is already stopped but that it does not stop within 10 seconds:
AssertionError: Predicate ''''
wait_until_helper_internal(lambda: not self.network_event_loop.is_running(), timeout=timeout)
''' not true after 10.0 seconds
=> is_running() keeps returning True after 10 seconds.
Closing for now. I'd guess this is an LLM-generated one-shot pr that was submitted blindly and the contributor went away?