mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Construct Server after Overlay and WSDoors:
When the ServerHandler is constructed before the Overlay, an incoming connection received after the server's listening ports have been opened but before the Overlay object has been created causes a crash.
This commit is contained in:
@@ -706,12 +706,6 @@ public:
|
||||
//
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
{
|
||||
auto setup = setup_ServerHandler(getConfig(), std::cerr);
|
||||
setup.makeContexts();
|
||||
serverHandler_->setup (setup, m_journal);
|
||||
}
|
||||
|
||||
// VFALCO NOTE Unfortunately, in stand-alone mode some code still
|
||||
// foolishly calls overlay(). When this is fixed we can
|
||||
// move the instantiation inside a conditional:
|
||||
@@ -723,6 +717,12 @@ public:
|
||||
get_io_service());
|
||||
add (*m_overlay); // add to PropertyStream
|
||||
|
||||
{
|
||||
auto setup = setup_ServerHandler(getConfig(), std::cerr);
|
||||
setup.makeContexts();
|
||||
serverHandler_->setup (setup, m_journal);
|
||||
}
|
||||
|
||||
// Create websocket doors
|
||||
for (auto const& port : serverHandler_->setup().ports)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user