This repository was archived by the owner on Jun 18, 2022. It is now read-only.
File tree 4 files changed +10
-5
lines changed
src/Telegram.Bot.Extensions.Polling/Extensions
4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 6
6
7
7
env :
8
8
USE_CI_FEED : false
9
- VERSION : 1.0.0
9
+ VERSION : 1.0.1
10
10
IS_PRERELEASE : false
11
11
PROJECT_PATH : src/Telegram.Bot.Extensions.Polling/Telegram.Bot.Extensions.Polling.csproj
12
12
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/).
23
23
24
24
## [ Unreleased]
25
25
26
+ ### Fixed
27
+
28
+ - Fixed timeout for throwing out pending updates on start
29
+
30
+ ## [ 1.0.0] - 2021-11-17
31
+
26
32
### Changed
27
33
- All method arguments that accept ` ReceiverOptions ` are renamed from ` receiveOptions ` to ` receiverOptions `
28
34
Original file line number Diff line number Diff line change @@ -152,14 +152,14 @@ try
152
152
{
153
153
if (update .Message is Message message )
154
154
{
155
- await Bot .SendTextMessageAsync (
155
+ await bot .SendTextMessageAsync (
156
156
message .Chat ,
157
157
$" Still have to process {updateReceiver .PendingUpdates } updates"
158
158
);
159
159
}
160
160
}
161
161
}
162
- catch (OperationCancelledException exception )
162
+ catch (OperationCanceledException exception )
163
163
{
164
164
}
165
165
```
Original file line number Diff line number Diff line change @@ -21,12 +21,11 @@ internal static async Task<int> ThrowOutPendingUpdatesAsync(
21
21
this ITelegramBotClient botClient ,
22
22
CancellationToken cancellationToken = default )
23
23
{
24
- var timeout = ( int ) botClient . Timeout . TotalSeconds ;
25
24
var request = new GetUpdatesRequest
26
25
{
27
26
Limit = 1 ,
28
27
Offset = - 1 ,
29
- Timeout = timeout ,
28
+ Timeout = 0 ,
30
29
AllowedUpdates = Array . Empty < UpdateType > ( ) ,
31
30
} ;
32
31
var updates = await botClient . MakeRequestAsync ( request : request , cancellationToken : cancellationToken )
You can’t perform that action at this time.
0 commit comments