mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2025-01-01 05:57:52 +01:00
Ignore NuSuchElementExceptions when removing channel handlers.
This commit is contained in:
parent
8067799306
commit
1141c0ba71
@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user