Archiviert
13
0

Don't remove channel handlers in the main thread - can case deadlock.

Dieser Commit ist enthalten in:
Kristian S. Stangeland 2014-04-09 02:57:52 +02:00
Ursprung 8cb9e050a5
Commit be238f6ac6

Datei anzeigen

@ -187,10 +187,20 @@ public abstract class TinyProtocol {
public final void close() {
if (!closed) {
closed = true;
// Compute this once
final String handlerName = getHandlerName();
// Remove our handlers
for (Player player : plugin.getServer().getOnlinePlayers()) {
getChannel(player).pipeline().remove(getHandlerName());
final Channel channel = getChannel(player);
// See ChannelInjector in ProtocolLib, line 590
channel.eventLoop().execute(new Runnable() {
@Override
public void run() {
channel.pipeline().remove(handlerName);
}
});
}
// Clean up Bukkit