|
Hello! While using BoostHttpOnlySslClient when timeout much greater than 10 seconds is set for TgLongPoll (50 sec, 100 sec) it leads to std::exception throwing (from here https://github.com/reo7sp/tgbot-cpp/blob/master/src/net/BoostHttpOnlySslClient.cpp#L74) in few seconds after TgLongPoll::start() method call. And one more - in TgLongPoll::start() method Api::getUpdates() is called twice (here https://github.com/reo7sp/tgbot-cpp/blob/master/src/net/TgLongPoll.cpp#L25 and here https://github.com/reo7sp/tgbot-cpp/blob/master/src/net/TgLongPoll.cpp#L36) both times with the same predefined timeout value, so result is that real long polling period is twice bigger than expected. Or this is how it should work? Thanks. |
Replies: 3 comments
|
Hi! Thanks for your message.
I'll keep you updated. |
|
Hello! The issues should now be fixed with the newest commit. |
|
Both old issues are resolved. Current |
Both old issues are resolved. Current
TgLongPoll::start()performs onegetUpdates()request per iteration, and the HTTP timeout is derived from the configured long-poll timeout. In v1.12 usestartLoop(errorHandler)for continuous polling.