This repository was archived by the owner on Jun 18, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +10
-5
lines changed
src/Telegram.Bot.Extensions.Polling/Extensions Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 66
77env :
88 USE_CI_FEED : false
9- VERSION : 1.0.0
9+ VERSION : 1.0.1
1010 IS_PRERELEASE : false
1111 PROJECT_PATH : src/Telegram.Bot.Extensions.Polling/Telegram.Bot.Extensions.Polling.csproj
1212 CONFIGURATION : Release
Original file line number Diff line number Diff line change @@ -23,6 +23,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
2323
2424## [ Unreleased]
2525
26+ ### Fixed
27+
28+ - Fixed timeout for throwing out pending updates on start
29+
30+ ## [ 1.0.0] - 2021-11-17
31+
2632### Changed
2733- All method arguments that accept ` ReceiverOptions ` are renamed from ` receiveOptions ` to ` receiverOptions `
2834
Original file line number Diff line number Diff line change @@ -152,14 +152,14 @@ try
152152 {
153153 if (update .Message is Message message )
154154 {
155- await Bot .SendTextMessageAsync (
155+ await bot .SendTextMessageAsync (
156156 message .Chat ,
157157 $" Still have to process {updateReceiver .PendingUpdates } updates"
158158 );
159159 }
160160 }
161161}
162- catch (OperationCancelledException exception )
162+ catch (OperationCanceledException exception )
163163{
164164}
165165```
Original file line number Diff line number Diff line change @@ -21,12 +21,11 @@ internal static async Task<int> ThrowOutPendingUpdatesAsync(
2121 this ITelegramBotClient botClient ,
2222 CancellationToken cancellationToken = default )
2323 {
24- var timeout = ( int ) botClient . Timeout . TotalSeconds ;
2524 var request = new GetUpdatesRequest
2625 {
2726 Limit = 1 ,
2827 Offset = - 1 ,
29- Timeout = timeout ,
28+ Timeout = 0 ,
3029 AllowedUpdates = Array . Empty < UpdateType > ( ) ,
3130 } ;
3231 var updates = await botClient . MakeRequestAsync ( request : request , cancellationToken : cancellationToken )
You can’t perform that action at this time.
0 commit comments