mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Use more C++11 features:
* Remove beast::static_initializer * Remove noexcept VS2013 workaround * Use [[noreturn]] attribute
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
#include <ripple/basics/chrono.h>
|
||||
#include <beast/container/aged_unordered_set.h>
|
||||
#include <beast/module/core/diagnostic/FatalError.h>
|
||||
#include <beast/utility/static_initializer.h>
|
||||
#include <cstdint>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
@@ -323,9 +322,7 @@ disallowRenegotiation (SSL const* ssl, bool isNew)
|
||||
// Do not allow a connection to renegotiate
|
||||
// more than once every 4 minutes
|
||||
|
||||
static beast::static_initializer <StaticData> static_data;
|
||||
|
||||
auto& sd (static_data.get ());
|
||||
static StaticData sd;
|
||||
std::lock_guard <std::mutex> lock (sd.lock);
|
||||
auto const expired (sd.set.clock().now() - std::chrono::minutes(4));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user