From 806d8db44c07dc4ab91e1b96ab2015476e29fa48 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Tue, 16 Jan 2018 16:49:01 -0800 Subject: [PATCH] Fix seemingly deadlocking loop scenario. --- src/telepathy/bot.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/telepathy/bot.cr b/src/telepathy/bot.cr index ad530c7..e4d5766 100644 --- a/src/telepathy/bot.cr +++ b/src/telepathy/bot.cr @@ -130,7 +130,6 @@ module Telepathy @last_update_id = action.nil? ? @last_update_id : action + 1 @update_channel.send get_updates 10 when Control - @update_channel.send action break end end @@ -143,6 +142,7 @@ module Telepathy process_updates(item) @poll_channel.send item.last?.try &.update_id when Control + @poll_channel.send item break end end