Skip to content

Commit b1b9343

Browse files
fix: dont allow bot.start on a started cluster (#1384)
1 parent fb48e97 commit b1b9343

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/dpp/cluster.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ void cluster::add_reconnect(uint32_t shard_id) {
209209

210210
void cluster::start(start_type return_after) {
211211

212+
if (start_time != 0) {
213+
throw dpp::logic_exception("Cluster already started");
214+
}
215+
212216
auto event_loop = [this]() -> void {
213217
auto reconnect_monitor = numshards != NO_SHARDS ? start_timer([this](auto t) {
214218
time_t now = time(nullptr);

0 commit comments

Comments
 (0)