fix: check event loop state before stopping in NetworkThread.close() #34334

pull forkfury wants to merge 1 commits into bitcoin:master from forkfury:fix/p2p-network-thread-close-already-stopped changing 1 files +4 −2
  1. forkfury commented at 8:43 pm on January 18, 2026: none

    Fixes #34248

    Add is_running() check in NetworkThread.close() to prevent timeout when event loop is already stopped on NetBSD.

  2. Update p2p.py d0fcc74fed
  3. DrahtBot commented at 8:43 pm on January 18, 2026: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34334.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #34346 (test: use IP_PORTRANGE_HIGH on FreeBSD for dynamic port allocation by w0xlt)

    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.

  4. maflcko commented at 7:21 am on January 19, 2026: member
    why would it already be closed, and why would the check help anything to improve the situation?
  5. vasild commented at 3:12 pm on January 21, 2026: contributor

    I think the problem is not that it is already stopped but that it does not stop within 10 seconds:

    0AssertionError: Predicate ''''
    1        wait_until_helper_internal(lambda: not self.network_event_loop.is_running(), timeout=timeout)
    2''' not true after 10.0 seconds
    

    => is_running() keeps returning True after 10 seconds.

  6. maflcko commented at 3:41 pm on January 21, 2026: member
    Closing for now. I’d guess this is an LLM-generated one-shot pr that was submitted blindly and the contributor went away?
  7. maflcko closed this on Jan 21, 2026


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-01-27 06:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me