samczsun / Skype4J

Skype API written in Java. Does not support P2P chats
Apache License 2.0
145 stars 48 forks source link

Skype connection closes after long idle time #135

Closed DzianisH closed 7 years ago

DzianisH commented 8 years ago

I'm start my bot and leave it for a whole night without any tasks in background. At the morning I see that it doesn't work anymore because connection with server was lost. So at the morning my bot can't send or receive any message without restart.

Probably the issue is produced because OS or antivirus software kick it out on the timeout. But anyway, we are haven't such issue in Skype desktop client.

slavias commented 8 years ago

As per code active session is 24hours. If less then 30 minutes left client will be relogined. I have same issue depends of energy saving of OS after some time without action. After waking up skype client stop working, also another rest client stop working. I think this issue depends on java connection with energy-saving parameter of OS (sleep, hibernate etc.) Try to deactivate such activity of OS and try again. OS: Win7

DzianisH commented 7 years ago

Well, I allready disable such parrameters. Anyway, it seems like Skype4J do not close connections itself. I guess issue can be closed.

As per code active session is 24hours. If less then 30 minutes left client will be relogined.

May be that is good idea to encapsulate such logic in library? I really don't want to think about low-level connection troubles when I implement some chatbot.

ducc commented 7 years ago

Welcome to skype :(