tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

Incorrect if condition #2519

Closed ivan-gorin closed 1 year ago

ivan-gorin commented 1 year ago

Hi, I've been looking through the tdlib code and noticed this part:

https://github.com/tdlib/td/blob/66234ae2537a99ec0eaf7b0857245a6e5c2d2bc9/td/telegram/ConfigManager.cpp#L941-L946

What is the point of the else, would it ever get called? Is it working as intended?

I've looked at the commit message for this line, but it's not very informative.

levlam commented 1 year ago

Yes, it works as intended. The config is reloaded on each restart. If the behavior would be ever unintended, then just " || true" needs to be removed.