Commit 417eae78 authored by jan.koester's avatar jan.koester
Browse files

test

parent 60938983
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1270,4 +1270,14 @@ size_t client::vacuum_all_nodes() {
    return ok_count;
}

void client::mark_node_dead(size_t node_index) {
    std::lock_guard<std::mutex> guard(mutex_);
    if (node_index < connections_.size()) {
        connections_[node_index].socket.reset();
        connections_[node_index].connected = false;
        connections_[node_index].dead_until =
            std::chrono::steady_clock::now() + std::chrono::seconds(10);
    }
}

} // namespace paritypp