fix(eventsub): close connection after timeout (#6059)
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@
|
|||||||
- Bugfix: Fixed a thick border on Windows 11. (#5836)
|
- Bugfix: Fixed a thick border on Windows 11. (#5836)
|
||||||
- Bugfix: Fixed some windows not immediately closing. (#6054)
|
- Bugfix: Fixed some windows not immediately closing. (#6054)
|
||||||
- Dev: Subscriptions to PubSub channel points redemption topics now use no auth token, making it continue to work during PubSub shutdown. (#5947)
|
- Dev: Subscriptions to PubSub channel points redemption topics now use no auth token, making it continue to work during PubSub shutdown. (#5947)
|
||||||
- Dev: Add initial experimental EventSub support. (#5837, #5895, #5897, #5904, #5910, #5903, #5915, #5916, #5930, #5935, #5932, #5943, #5952, #5953, #5968, #5973, #5974, #5980, #5981, #5985, #5990, #5992, #5993, #5996, #5995, #6000, #6001, #6002, #6003, #6005, #6007, #6010, #6008, #6012, #6013, #6015, #6017, #6027, #6028, #6035, #6036, #6040, #6041, #6048, #6058)
|
- Dev: Add initial experimental EventSub support. (#5837, #5895, #5897, #5904, #5910, #5903, #5915, #5916, #5930, #5935, #5932, #5943, #5952, #5953, #5968, #5973, #5974, #5980, #5981, #5985, #5990, #5992, #5993, #5996, #5995, #6000, #6001, #6002, #6003, #6005, #6007, #6010, #6008, #6012, #6013, #6015, #6017, #6027, #6028, #6035, #6036, #6040, #6041, #6048, #6058, #6059)
|
||||||
- Dev: Remove unneeded platform specifier for toasts. (#5914)
|
- Dev: Remove unneeded platform specifier for toasts. (#5914)
|
||||||
- Dev: Cleanly shutdown on `SIGINT`/`SIGTERM` on Linux & macOS. (#6053)
|
- Dev: Cleanly shutdown on `SIGINT`/`SIGTERM` on Linux & macOS. (#6053)
|
||||||
- Dev: Highlight checks now use non-capturing groups for the boundaries. (#5784)
|
- Dev: Highlight checks now use non-capturing groups for the boundaries. (#5784)
|
||||||
|
|||||||
@@ -174,13 +174,13 @@ void BM_ParseAndHandleMessages(benchmark::State &state)
|
|||||||
boost::asio::io_context ioc;
|
boost::asio::io_context ioc;
|
||||||
boost::asio::ssl::context ssl(
|
boost::asio::ssl::context ssl(
|
||||||
boost::asio::ssl::context::method::tls_client);
|
boost::asio::ssl::context::method::tls_client);
|
||||||
Session sess(ioc, ssl, std::move(listener));
|
auto sess = std::make_shared<Session>(ioc, ssl, std::move(listener));
|
||||||
|
|
||||||
for (auto _ : state)
|
for (auto _ : state)
|
||||||
{
|
{
|
||||||
for (const auto &msg : messages)
|
for (const auto &msg : messages)
|
||||||
{
|
{
|
||||||
boost::system::error_code ec = sess.handleMessage(msg);
|
boost::system::error_code ec = sess->handleMessage(msg);
|
||||||
assert(!ec);
|
assert(!ec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -556,6 +556,7 @@ void Session::checkKeepalive()
|
|||||||
{
|
{
|
||||||
this->listener->onClose(std::move(this->listener), {});
|
this->listener->onClose(std::move(this->listener), {});
|
||||||
}
|
}
|
||||||
|
this->close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->receivedMessage = false;
|
this->receivedMessage = false;
|
||||||
|
|||||||
@@ -157,8 +157,8 @@ TEST_P(TestHandleMessageP, Run)
|
|||||||
boost::asio::io_context ioc;
|
boost::asio::io_context ioc;
|
||||||
boost::asio::ssl::context ssl(
|
boost::asio::ssl::context ssl(
|
||||||
boost::asio::ssl::context::method::tls_client);
|
boost::asio::ssl::context::method::tls_client);
|
||||||
Session sess(ioc, ssl, std::move(listener));
|
auto sess = std::make_shared<Session>(ioc, ssl, std::move(listener));
|
||||||
auto ec = sess.handleMessage(buf);
|
auto ec = sess->handleMessage(buf);
|
||||||
ASSERT_FALSE(ec.failed())
|
ASSERT_FALSE(ec.failed())
|
||||||
<< ec.what() << ec.message() << ec.location().to_string();
|
<< ec.what() << ec.message() << ec.location().to_string();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -309,7 +309,8 @@ TEST_P(TestEventSubMessagesP, Run)
|
|||||||
boost::asio::io_context ioc;
|
boost::asio::io_context ioc;
|
||||||
boost::asio::ssl::context ssl(
|
boost::asio::ssl::context ssl(
|
||||||
boost::asio::ssl::context::method::tls_client);
|
boost::asio::ssl::context::method::tls_client);
|
||||||
eventsub::lib::Session sess(ioc, ssl, std::move(listener));
|
auto sess =
|
||||||
|
std::make_shared<eventsub::lib::Session>(ioc, ssl, std::move(listener));
|
||||||
|
|
||||||
for (const auto inputRef : input)
|
for (const auto inputRef : input)
|
||||||
{
|
{
|
||||||
@@ -328,7 +329,7 @@ TEST_P(TestEventSubMessagesP, Run)
|
|||||||
|
|
||||||
auto json = makePayload(eventSubscription->second, inputObj);
|
auto json = makePayload(eventSubscription->second, inputObj);
|
||||||
|
|
||||||
auto ec = sess.handleMessage(json);
|
auto ec = sess->handleMessage(json);
|
||||||
ASSERT_FALSE(ec.failed())
|
ASSERT_FALSE(ec.failed())
|
||||||
<< ec.what() << ec.message() << ec.location().to_string();
|
<< ec.what() << ec.message() << ec.location().to_string();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user