mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
reset request coordinator after connection failure
This commit is contained in:
@@ -109,6 +109,14 @@ public:
|
||||
value = m_requests.front();
|
||||
m_requests.pop();
|
||||
}
|
||||
|
||||
void reset() {
|
||||
boost::unique_lock<boost::mutex> lock(m_lock);
|
||||
|
||||
while (!m_requests.empty()) {
|
||||
m_requests.pop();
|
||||
}
|
||||
}
|
||||
private:
|
||||
std::queue<request> m_requests;
|
||||
boost::mutex m_lock;
|
||||
|
||||
@@ -174,6 +174,8 @@ int start_client(po::variables_map& vm) {
|
||||
// This will block until there is an error or the websocket closes
|
||||
endpoint.run();
|
||||
|
||||
rc.reset();
|
||||
|
||||
if (!reconnect) {
|
||||
break;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user