MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / Disconnect

Method Disconnect

plugins/twitch/event-sub.cpp:166–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void EventSub::Disconnect()
167{
168 std::lock_guard<std::mutex> lock(_connectMtx);
169 _disconnect = true;
170 websocketpp::lib::error_code ec;
171 _client->close(_connection, websocketpp::close::status::normal,
172 "Twitch EventSub stopping", ec);
173 {
174 std::unique_lock<std::mutex> waitLock(_waitMtx);
175 _cv.notify_all();
176 }
177
178 if (_thread.joinable()) {
179 _thread.join();
180 }
181 _connected = false;
182 ClearActiveSubscriptions();
183}
184
185EventSubMessageBuffer EventSub::RegisterForEvents()
186{

Callers 1

DisconnectAllMethod · 0.45

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected