http: Detect remote disconnect #19434

pull promag wants to merge 5 commits into bitcoin:master from promag:2020-06-remote-disconnect changing 2 files +50 −27
  1. promag commented at 1:20 AM on July 3, 2020: member

    Builds on #19420, review last commit only.

  2. fanquake added the label RPC/REST/ZMQ on Jul 3, 2020
  3. promag commented at 1:24 AM on July 3, 2020: member

    This is a requirement in case we want to support RPC interruption due to connection close. For instance, currently interrupting the command bitcoin-cli -regtest waitfornewblock doesn't interrupt the server handling.

    This is also relevant for long calls, especially scantxoutset.

  4. promag cross-referenced this on Jul 3, 2020 from issue http: Track active requests and wait for last to finish by promag
  5. promag cross-referenced this on Jul 3, 2020 from issue Intermittent CI failure: "ProcessNewBlock, block not accepted" when running feature_dersig.py by promag
  6. promag force-pushed on Jul 5, 2020
  7. DrahtBot commented at 10:39 PM on July 5, 2020: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    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.

  8. promag closed this on Jul 16, 2020

  9. promag commented at 12:23 PM on July 16, 2020: member

    Re-run CI.

  10. promag reopened this on Jul 16, 2020

  11. http: Release work queue after event base finish
    This fixes a race between http_request_cb and StopHTTPServer where
    the work queue is used after release.
    f4fa4255b4
  12. http: Track active requests and wait for last to finish 2c3cd7bdaa
  13. http: Relese server before waiting for event base loop exit 6ea65ee550
  14. http: Detect remote disconnect e64264814d
  15. wip 578fed1f5d
  16. in test/functional/mining_getblocktemplate_longpoll.py:27 in 5ea6e50fc4 outdated
      21 | @@ -22,7 +22,10 @@ def __init__(self, node):
      22 |          self.node = get_rpc_proxy(node.url, 1, timeout=600, coveragedir=node.coverage_dir)
      23 |  
      24 |      def run(self):
      25 | -        self.node.getblocktemplate({'longpollid': self.longpollid, 'rules': ['segwit']})
      26 | +        try:
      27 | +            self.node.getblocktemplate({'longpollid': self.longpollid, 'rules': ['segwit']})
      28 | +        except:
    


    luke-jr commented at 11:48 PM on July 23, 2020:

    Why is this test breaking?

  17. promag force-pushed on Aug 16, 2020
  18. DrahtBot cross-referenced this on Jun 28, 2021 from issue refactor: Make httpserver work queue a unique_ptr by maflcko
  19. DrahtBot added the label Needs rebase on Dec 13, 2021
  20. DrahtBot commented at 11:19 PM on December 13, 2021: contributor

    <!--cf906140f33d8803c4a75a2196329ecb-->

    🐙 This pull request conflicts with the target branch and needs rebase.

    <sub>Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".</sub>

  21. DrahtBot commented at 1:07 PM on March 21, 2022: contributor

    <!--13523179cfe9479db18ec6c5d236f789-->There hasn't been much activity lately and the patch still needs rebase. What is the status here?

    • Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
    • Is it no longer relevant? ➡️ Please close.
    • Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.
  22. maflcko commented at 1:39 PM on March 21, 2022: member

    Looks like this might be waiting on #19420

  23. promag commented at 1:43 PM on March 21, 2022: member
  24. fanquake commented at 11:08 AM on December 6, 2022: member

    Given that #19420 (base PR) has now been closed, going to close this for now as well. If the base PR is reopened, we could reopen this PR too.

  25. fanquake closed this on Dec 6, 2022

  26. fjahr cross-referenced this on Dec 22, 2022 from issue http: Track active requests and wait for last to finish - 2nd attempt by fjahr
  27. achow101 referenced this in commit 86bacd75e7 on Mar 7, 2023
  28. sidhujag referenced this in commit 61edeffbd5 on Mar 7, 2023
  29. fjahr cross-referenced this on Mar 11, 2023 from issue http: Detect remote disconnect - 2nd attempt by fjahr
  30. Crypt-iQ cross-referenced this on May 23, 2023 from issue bitcoind hangs waiting for `g_requests.empty()` by Crypt-iQ
  31. stickies-v cross-referenced this on Sep 29, 2023 from issue http: bugfix: allow server shutdown in case of remote client disconnection by stickies-v
  32. fanquake referenced this in commit db7b5dfcc5 on Oct 4, 2023
  33. Frank-GER referenced this in commit b0fea09705 on Oct 13, 2023
  34. bitcoin locked this on Dec 6, 2023

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-05-20 06:54 UTC