Merge v1.2.9.2_dev into main - #8
Merged
Merged
Conversation
Formerly when `Bot::stop` gets called the former `Bot::m_running` variable is set to false, but any underlying `cpr::Session::Get/Post` will block until timing out. Currently, we set an optional cancellation token from `Bot` in `Api::sendRequest` so that for `Api::getUpdates` we can exit immediately after `Bot::stop` is called, without having to call `std::exit`.
Stop getUpdates longpolling on Bot::stop
- Now the bot cancels the long polling request when its stopped for a graceful exit
to be able to reduce the number of updates being parsed in memory tight systems
Only cache when needed
github-actions Bot
pushed a commit
that referenced
this pull request
Jan 3, 2026
Merge v1.2.9.2_dev into main ab9b69f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v1.2.9.2
What's Changed
ErrorCode::REQUEST_CANCELLEDfor detecting long polling cancellationsv1.11.3tov1.14.1std::monostatefor optionalstd::variantinstead of anstd::optional<std::variant<...>>api()->setUpdatesLimit(N)- defaulted to 100New Contributors
Full Changelog: v1.1.9.2...v1.2.9.2
Supported Api methods & Objects (Telegram Api v9.2 and below)
Demos
See examples