Archiviert
13
0

Ignore NuSuchElementExceptions when removing channel handlers.

Dieser Commit ist enthalten in:
Kristian S. Stangeland 2014-05-21 23:04:29 +02:00
Ursprung 8067799306
Commit 1141c0ba71

Datei anzeigen

@ -3,6 +3,7 @@ package com.comphenix.tinyprotocol;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set; import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level; import java.util.logging.Level;
@ -204,7 +205,11 @@ public abstract class TinyProtocol {
// Remove channel handler // Remove channel handler
serverChannel.eventLoop().execute(new Runnable() { serverChannel.eventLoop().execute(new Runnable() {
public void run() { public void run() {
try {
pipeline.remove(serverChannelHandler); pipeline.remove(serverChannelHandler);
} catch (NoSuchElementException e) {
// That's fine
}
} }
}); });
} }