JDA occasionally fails to detect a socket being disconnected.

Created on 28 Sep 2016  路  2Comments  路  Source: DV8FromTheWorld/JDA

After reviewing reports of my bot, ErisBot disappearing from a set amount of guilds, I've found that JDA will sometimes struggle to detect the socket being closed.
I'm assuming this only affects a timeout since it doesn't always happen but have not tested.

After around 10-20 minutes after the connection has died, it finally realizes and closes, thus attempting a reconnect.

I've reported it in the Discord and @Almighty-Alpaca found that there is no timeout set on the websocket. I got asked to open a Github issue to help track this so hello!

bug

Most helpful comment

I checked the internal source of the websocket and didn't see the possibility to set a timeout except for the initial connection (default java socket timeout system).

In 3.x I'm going to be reinvestigating the heartbeat ack for forcing disconnect.

All 2 comments

I checked the internal source of the websocket and didn't see the possibility to set a timeout except for the initial connection (default java socket timeout system).

In 3.x I'm going to be reinvestigating the heartbeat ack for forcing disconnect.

JDA 2 no longer has support along with everybody shifting off it. This shouldn't be a problem for JDA 3 considering it's been completely rewritten.

Closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Frederikam picture Frederikam  路  3Comments

Frederikam picture Frederikam  路  4Comments

ExpDev07 picture ExpDev07  路  6Comments

StijnSimons picture StijnSimons  路  3Comments

andrei1058 picture andrei1058  路  6Comments