pengrad / java-telegram-bot-api

Telegram Bot API for Java

Home Page:https://core.telegram.org/bots

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stopping the updates listener doesn't cancel running request properly

DespairScent opened this issue · comments

Stopping updates listener and starting it again in a short time causes two streams of requests to run simultaneously, resulting in Update listener error for request {"method":"getUpdates"} with response 409 Conflict: terminated by other getUpdates request; make sure that only one bot instance is running showing continuously.

How to reproduce:

TelegramBot telegramBot = ...;
telegramBot.setUpdatesListener(...);
telegramBot.removeGetUpdatesListener();
telegramBot.setUpdatesListener(...);

Thanks, fixed in 6.9.1