mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
rearranges some stuff
This commit is contained in:
@@ -52,12 +52,13 @@ int main() {
|
||||
// Create a server endpoint
|
||||
server echo_server;
|
||||
|
||||
// Initialize ASIO
|
||||
echo_server.init_asio();
|
||||
|
||||
// Register our message handler
|
||||
echo_server.set_message_handler(bind(&on_message,&echo_server,::_1,::_2));
|
||||
echo_server.set_tls_init_handler(bind(&on_tls_init,::_1));
|
||||
|
||||
// Initialize ASIO
|
||||
echo_server.init_asio();
|
||||
|
||||
// Listen on port 9002
|
||||
echo_server.listen(9002);
|
||||
|
||||
@@ -99,7 +99,8 @@ public:
|
||||
|
||||
if (!con) {
|
||||
// TODO: should this be considered a server fatal error?
|
||||
std::cout << "handle_accept got an invalid handle back" << std::endl;
|
||||
std::cout << "handle_accept got an invalid handle back"
|
||||
<< std::endl;
|
||||
} else {
|
||||
if (ec) {
|
||||
con->terminate();
|
||||
@@ -110,6 +111,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: are there cases where we should terminate this loop?
|
||||
start_accept();
|
||||
}
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user