Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Echo code parameter on suspend(code) return, define LOGA(). #399

Merged
merged 2 commits into from
May 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Echo code parameter on suspend(code) return.
  • Loading branch information
evoskuil committed May 9, 2024
commit c84aee1c50fcf976209ce508f97561567a0e6914
4 changes: 2 additions & 2 deletions include/bitcoin/network/p2p.hpp
Original file line number Diff line number Diff line change
@@ -115,8 +115,8 @@ class BCT_API p2p
/// Nework connections are suspended (incoming and/or outgoing).
virtual bool suspended() const NOEXCEPT;

/// Suspend/resume all connections.
virtual void suspend(const code& ec) NOEXCEPT;
/// Suspend/resume all connections (echos input parameter).
virtual code suspend(const code& ec) NOEXCEPT;
virtual void resume() NOEXCEPT;

/// Properties.
3 changes: 2 additions & 1 deletion src/p2p.cpp
Original file line number Diff line number Diff line change
@@ -412,10 +412,11 @@ void p2p::resume_connectors() NOEXCEPT
connect_suspended_.store(false);
}

void p2p::suspend(const code&) NOEXCEPT
code p2p::suspend(const code& ec) NOEXCEPT
{
suspend_acceptors();
suspend_connectors();
return ec;
}

void p2p::resume() NOEXCEPT
Loading