[SPIGOT-2642] Restart API / Command: Not shutting down correctly. Created: 30/Aug/16  Updated: 30/Aug/16  Resolved: 30/Aug/16

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Chalkie Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Environment:

Centos/Windows
With and Without Multicraft
Spigot: 1.10.2 - 43ab266
Server with multiple plugins.
Server with a single plugin.
Tested With Offline Mode = True.



 Description   

Currently when using the built in spigot restart command (spigot:restart) or the api Bukkit.getServer().spigot().restart() it seems that the plugins don't get a chance to shutdown correctly and/or this information isn't displayed within the console window.

When using the stop command, you can clearly see plugins disabling, db connections closing ect. However, when using the restart command and/or api none of this is seen.
I created a test plugin that displays a message in the onDisable() with mixed results.
On a server with multiple plugins, I wasn't able to see the message displayed at all, on a test server only running that plugin I was only sometimes able to see the message (plugin was loaded).

Added below are some screenshots and the source for the test plugin. I do apologise if I have missed something obvious.

Thanks for your time.

Source Test Plugin: http://pastebin.com/C4m9x5L7
Download Test Plugin: https://www.dropbox.com/s/hx9j2xnc3etgbji/SpigotRestart.jar?dl=0

Screenshot 1 (Plain Server, Test Plugin): https://i.gyazo.com/6d45f50bbf90a49284745ae508084ca5.png
*Screenshot 2 *:https://i.gyazo.com/9c96d61da4b03e046afaeda802bc4994.png
Screenshot 3 (Added Few Extra Plugins): https://i.gyazo.com/d69ed83657a7d8ec26c452b02a7389cd.png
Screenshot 4 (Using the API instead of the Command): https://gyazo.com/357f91869b46db453b90ed3e31314bfb

Note: My test server is only using 1 thread for Netty IO, however were I first noticed this was on a "real" server that uses 4. So I don't believe that is the issue. (Also just tested it with 4 and no change)



 Comments   
Comment by md_5 [ 30/Aug/16 ]

Yeah, you kind of did.
This bug only occurs when the start script (start.sh) doesn't exist (in which case you should be using /stop ?).
In any case I've fixed that.

Generated at Fri Mar 21 08:21:21 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.