mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-24 23:50:22 +00:00
fix: Fix regression in ConnectAttempt (#5900)
A regression was introduced in #5669 which would cause rippled to potentially dereference a disengaged std::optional when connecting to a peer. This would cause UB in release build and crash in debug. Co-authored-by: Bart Thomee <11445373+bthomee@users.noreply.github.com>
This commit is contained in:
@@ -600,8 +600,8 @@ ConnectAttempt::processResponse()
|
||||
JLOG(journal_.info()) << "Cluster name: " << *member;
|
||||
}
|
||||
|
||||
auto const result =
|
||||
overlay_.peerFinder().activate(slot_, publicKey, !member->empty());
|
||||
auto const result = overlay_.peerFinder().activate(
|
||||
slot_, publicKey, member.has_value());
|
||||
if (result != PeerFinder::Result::success)
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
Reference in New Issue
Block a user