mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
Core bug fixes and improvements
This commit is contained in:
@@ -29,7 +29,7 @@ namespace Kruzya.TelegramBot.Core.Service
|
||||
public Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
_logger.LogInformation("Message sender service is starting.");
|
||||
_timer = new Timer(Run, null, TimeSpan.Zero, TimeSpan.FromSeconds(1));
|
||||
_timer = new Timer(Run, null, TimeSpan.Zero, TimerPeriod);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
@@ -63,7 +63,7 @@ namespace Kruzya.TelegramBot.Core.Service
|
||||
}
|
||||
finally
|
||||
{
|
||||
var timerPeriod = this.TimerPeriod;
|
||||
var timerPeriod = TimerPeriod;
|
||||
_timer?.Change(timerPeriod, timerPeriod);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user