From b5a217013a9387b87d3fac3c70254fb6a12e2238 Mon Sep 17 00:00:00 2001 From: fojetin Date: Mon, 30 Apr 2018 15:41:12 +0300 Subject: [PATCH] Fix #253 #231 #485 --- examples/webhook_examples/webhook_flask_echo_bot.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/webhook_examples/webhook_flask_echo_bot.py b/examples/webhook_examples/webhook_flask_echo_bot.py index 92ffa21..d0327d7 100644 --- a/examples/webhook_examples/webhook_flask_echo_bot.py +++ b/examples/webhook_examples/webhook_flask_echo_bot.py @@ -7,6 +7,7 @@ import flask import telebot import logging +import time API_TOKEN = '' @@ -73,6 +74,8 @@ def echo_message(message): # Remove webhook, it fails sometimes the set if there is a previous webhook bot.remove_webhook() +time.sleep(0.1) + # Set webhook bot.set_webhook(url=WEBHOOK_URL_BASE+WEBHOOK_URL_PATH, certificate=open(WEBHOOK_SSL_CERT, 'r'))