DiscordSRV

DiscordSRV

86.8k Downloads

Misc. JDA disconnection/interruption errors on shutdown

andrewkm opened this issue · 5 comments

commented

Expected behavior

No shutdown error.

Actual behavior

[15:46:17] [Server thread/INFO]: [DiscordSRV] Disabling DiscordSRV v1.24.0
[15:46:17] [DiscordSRV - Shutdown/INFO]: [DiscordSRV] Saved linked accounts in 3ms
[15:46:17] [DiscordSRV - JDA Rate Limit/ERROR]: [DiscordSRV] [JDA] There was an I/O error while executing a REST request: null
[15:46:17] [DiscordSRV - JDA Callback 9/ERROR]: [DiscordSRV] DiscordSRV encountered an unknown Discord error: -1: java.io.InterruptedIOException
[15:46:17] [DiscordSRV - Shutdown/INFO]: [DiscordSRV] Shutdown completed in 167ms

Steps to reproduce

Shutdown server.

Server software and version

Paper 311

Checks

  • I am not using an outdated version of DiscordSRV.
  • I asked in DiscordSRV's Discord server to see whether this issue is in fact a bug that needs to be fixed.

Anything else

Running latest compiled on:
1d08598

commented

Known issue but pretty low priority. They're harmless and can be ignored but there's little DiscordSRV can to do not have those messages shown besides a logger filter.

commented

This has still not been fixed on shutdown:

[11:59:03] [Server thread/INFO]: [DiscordSRV] Disabling DiscordSRV v1.28.0-SNAPSHOT
[11:59:03] [DiscordSRV - JDA Rate Limit/ERROR]: [DiscordSRV] [JDA] There was an I/O error while executing a REST request: null
[11:59:03] [DiscordSRV - JDA Rate Limit/ERROR]: [DiscordSRV] [JDA] There was an I/O error while executing a REST request: null
[11:59:03] [DiscordSRV - JDA Callback 0/ERROR]: [DiscordSRV] DiscordSRV encountered an unknown Discord error: -1: java.io.InterruptedIOException
[11:59:03] [DiscordSRV - JDA Callback 0/ERROR]: [DiscordSRV] DiscordSRV encountered an unknown Discord error: -1: java.io.InterruptedIOException
[11:59:03] [DiscordSRV - Shutdown/INFO]: [DiscordSRV] Shutdown completed in 248ms

Paper 1.20.6 Build 148
DiscordSRV compiled against: 93867d7
Line 1110: [12:00:49] [pool-174-thread-1/INFO]: [DiscordSRV] This build of DiscordSRV is identical to develop. [latest public dev build]

commented

Requests are cancelled before JDA marks itself as shutting down,

if (status == JDA.Status.SHUTDOWN || status == JDA.Status.SHUTTING_DOWN) {
and
&& jda != null && (jda.getStatus() == JDA.Status.SHUTDOWN || jda.getStatus() == JDA.Status.SHUTTING_DOWN)) {

commented

Fix requires discordsrv to store a Boolean value when it’s been told to shutdown & for that value to be used as the condition instead

commented

closed by 49b83f3