Closed el-duderino5 closed 6 years ago
Isn't it a duplicated of #168 ?
@rubenlagus Yes, it appears to be so. Still, I think something must be done about it. I don't know what the implications of leaving this bot as is are, but I think the correct way is to somewhat shutdown that socket gracefully, either if is in an idle state or reading. This issue is also a duplicate of #189 , but I just wanted to know if something is being done about it and simply offer some asummptions or suggestions about what should be done about it. I was always taught that you close resources as soon as you don't need them/done with them, as it may cause memory leaks and who knows what else.
@el-duderino5 Is this exception still thrown with latest version?
Hey guys. Just documenting this error here as I have previously mentioned this in the telegrambots channel and there was no answer on whether there are plans to fix it:
When I call BotSession.stop() on a LongPollingBot that is active, I receive this error:
Is someone working on planning or solving this error? My guts tell me that there is a problem with the socket at the moment of stopping the session - Since it's longpolling, it is constantly (and feel free to correct me if I'm wrong) using getUpdates() to get outstanding updates, at the moment of closing the BotSession the socket is still trying to read from the Telegram server and, since the session is stopped, the operation abruptally ends without closing the socket properly first or gracefully interrupting the read operation.
This error may be related to this past issue #189