Skip to content

Commit 2bed422

Browse files
authored
Merge pull request #681 from evoskuil/master
Call exception safe override of boost socket remote_endpoint.
2 parents 0f5ef1f + e57e4d9 commit 2bed422

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/bitcoin/network/net/socket.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class BCT_API socket
251251
const result_handler& handler) NOEXCEPT;
252252

253253
// connection
254-
void handle_accept(const boost_code& ec,
254+
void handle_accept(boost_code ec,
255255
const result_handler& handler) NOEXCEPT;
256256
void handle_connect(const boost_code& ec, const asio::endpoint& peer,
257257
const result_handler& handler) NOEXCEPT;

src/net/socket.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,15 +581,15 @@ void socket::do_ws_event(ws::frame_type kind,
581581
// ----------------------------------------------------------------------------
582582
// These are invoked on strand upon failure, socket cancel, or completion.
583583

584-
void socket::handle_accept(const boost_code& ec,
584+
void socket::handle_accept(boost_code ec,
585585
const result_handler& handler) NOEXCEPT
586586
{
587587
// This is running in the acceptor (not socket) execution context.
588588
// socket_ and authority_ are not guarded here, see comments on accept.
589589
// address_ remains defaulted for inbound (accepted) connections.
590590

591591
if (!ec)
592-
authority_ = { socket_.remote_endpoint() };
592+
authority_ = { socket_.remote_endpoint(ec) };
593593

594594
if (error::asio_is_canceled(ec))
595595
{

0 commit comments

Comments
 (0)