DiscordSRV

DiscordSRV

86.8k Downloads

Reloading the server disconnects the Console channel

GiovanH opened this issue · 3 comments

commented

Reloading the server with /reload breaks the console channel, but not other text.
There is no issue reported in the logs.

Here are the logs, trimmed for relevance:

[17:59:41] [Server thread/INFO]: [DiscordSRV] Saved linked accounts in 2ms
[17:59:41] [Server thread/INFO]: [DiscordSRV] Saved metrics in 1ms
[17:59:41] [Server thread/INFO]: [DiscordSRV] Shutdown completed in 90ms
...
[17:59:41] [Server thread/INFO]: [DiscordSRV] Loading DiscordSRV v15.2
[17:59:42] [Server thread/INFO]: [DiscordSRV] Enabling DiscordSRV v15.2
[17:59:42] [DiscordSRV - Initialization/INFO]: [DiscordSRV] Language initialized as English
[17:59:42] [DiscordSRV - Initialization/ERROR]: [DiscordSRV] Failed to fetch URL https://raw.githubusercontent.com/Scarsz/DiscordSRV/randomaccessfiles/minimumbuild: https://raw.githubusercontent.com/Scarsz/DiscordSRV/randomaccessfiles/minimumbuild
[17:59:42] [DiscordSRV - Initialization/WARN]: [DiscordSRV] Failed to check against minimum version of DiscordSRV: received minimum build was not 40 characters long & thus not a commit hash
[17:59:43] [DiscordSRV - Initialization/INFO]: [DiscordSRV] DiscordSRV is up-to-date. (97f8c782402656f30be567a32c2b12d78ac3f5a4)
[17:59:43] [Server thread/INFO]: CONSOLE: �[0;32;1mReload complete.�[m
[17:59:43] [Craft Scheduler Thread - 902/INFO]: [ClearLag] 0 Logs have been removed!
[17:59:43] [DiscordSRV - Initialization/INFO]: [DiscordSRV] Thank you so much to these people for allowing DiscordSRV to grow to what it is: Ac3dUd3, Androkai, anton8604, buildblox, Bysokar, CoreyD97, DeeKay, Diamondman121314/DMAN, FataL, Foxy, geekhideout, Helmic, KaizenWorlds, LDSG Ghost, Mick, Mitecraft, Rui, Ryan (The Loyal One), Sicnus
[17:59:43] [DiscordSRV - Initialization/INFO]: [DiscordSRV] [JDA] Login Successful!
[17:59:43] [JDA MainWS-ReadThread/INFO]: [DiscordSRV] [JDA] Connected to WebSocket
[17:59:45] [JDA MainWS-ReadThread/INFO]: [DiscordSRV] [JDA] Finished Loading!
[17:59:45] [DiscordSRV - Initialization/INFO]: [DiscordSRV] Found server G:LWU Discord(232218346999775232)
[17:59:45] [DiscordSRV - Initialization/INFO]: [DiscordSRV] - TC:minecraft_server_chat(239576995304964098)
...
[17:59:45] [DiscordSRV - Initialization/INFO]: [DiscordSRV] - TC:minecraft_console(329358715239268353)
[17:59:45] [DiscordSRV - Initialization/INFO]: [DiscordSRV] Console forwarding assigned to channel TC:minecraft_console(329358715239268353)
[17:59:45] [DiscordSRV - Initialization/INFO]: [DiscordSRV] No chat plugin hooks enabled
[17:59:45] [DiscordSRV - Initialization/INFO]: [DiscordSRV] Colors: {3498DB=&3, 71368A=&5, 95A5A6=&7, AD1457=&d, 11806A=&2, 206694=&1, 1ABC9C=&a, 992D22=&4, E67E22=&6, A84300=&6, E74C3C=&c, 2ECC71=&a, 979C9F=&7, 607D8B=&8, 99AAB5=&f, F1C40F=&e, 1F8B4C=&2, E91E63=&c, 9B59B6=&5, C27C0E=&6, 546E7A=&8}```
commented

Don't reload DiscordSRV

commented

I'm forced to rely on the reload command due to my odd hosting situation, so this is hardly a satisfactory answer. Reloading DiscordSrv used to work.

A solution to this problem seems to involve properly detaching the text stream on unloading, and properly reattaching it on reloading.

You can tag this as low priority, but it's inaccurate to close this just because you personally don't have a use case.

commented

As specified in https://github.com/Scarsz/DiscordSRV/blob/master/CONTRIBUTING.md#reporting-an-issue and in the plugin description on Bukkit/Spigot I reloaded the plugin/server and now it won't work -> DON'T RELOAD THE PLUGIN, DiscordSRV does not like to be reloaded. It never has. Multiple attempts have been made to diagnose why it doesn't like to be reloaded, which has always been inconclusive. The issue has persisted over a complete rewrite of the plugin. You are not the first and certainly won't be the last to request DiscordSRV being reload-safe.

I'd like to remind you that the /reload command is by absolutely no means a "good" command to use. It's a cheap little hack that saves you from restarting the server. The command literally tells you that it will break some plugins and that if issues occur you should restart your server.

I question why restarting your server is such an issue, more so why you're needing to completely restart DiscordSRV in the first place.