| 1806 | } |
| 1807 | |
| 1808 | std::string Server::GetClientsStr() { |
| 1809 | std::string clients; |
| 1810 | for (const auto &t : worker_threads_) { |
| 1811 | clients.append(t->GetWorker()->GetClientsStr()); |
| 1812 | } |
| 1813 | |
| 1814 | std::shared_lock<std::shared_mutex> guard(slave_threads_mu_); |
| 1815 | |
| 1816 | for (const auto &st : slave_threads_) { |
| 1817 | clients.append(st->GetConn()->ToString()); |
| 1818 | } |
| 1819 | |
| 1820 | return clients; |
| 1821 | } |
| 1822 | |
| 1823 | void Server::KillClient(int64_t *killed, const std::string &addr, uint64_t id, uint64_t type, bool skipme, |
| 1824 | redis::Connection *conn) { |