TeamSpeak-3-Java-API
TeamSpeak-3-Java-API copied to clipboard
Socket Timeout Exception: Read timed out
Guten Morgen,
ich habe das Problem, dass mein Bot nach einer gewissen Zeit die Verbindung verliert.
Mit freundlichem Gruß, Martin Wagenbach
Fehlermeldung
https://pastebin.com/uBK80vDk
Code
de.mimnu.daddeleckets3bot.support.SupportChannel: https://pastebin.com/HvZdHZ1D
de.mimnu.daddeleckets3bot.afkmover.AfkMover: https://pastebin.com/Hm0LBkix
That's simply a timeout and doesn't give any further information about what went wrong. If you were connected on localhost a timeout really shouldn't happen, but still could.
Best thing you can do is add reconnect listeners to your bot to stop the Timer tasks after a disconnect happens, and after a successful reconnect restart them.
See this example: https://github.com/TheHolyWaffle/TeamSpeak-3-Java-API/blob/master/example/ReconnectExample.java
Also provide code snippets as a gisthub gist so it does not invalidate after time. The pastebin links dont work anymore :)