Only suppress ClosedChannelExceptions
Dieser Commit ist enthalten in:
Ursprung
900b31e0c9
Commit
ae47ae3b89
@ -243,6 +243,12 @@
|
|||||||
</developers>
|
</developers>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- This is for the JavaDocs
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.netty</groupId>
|
||||||
|
<artifactId>netty-all</artifactId>
|
||||||
|
<version>4.0.28.Final</version>
|
||||||
|
</dependency> -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cglib</groupId>
|
<groupId>cglib</groupId>
|
||||||
<artifactId>cglib-nodep</artifactId>
|
<artifactId>cglib-nodep</artifactId>
|
||||||
|
@ -284,13 +284,11 @@ public class NettyChannelInjector extends ByteToMessageDecoder implements Channe
|
|||||||
|
|
||||||
ChannelHandlerAdapter exceptionHandler = new ChannelHandlerAdapter() {
|
ChannelHandlerAdapter exceptionHandler = new ChannelHandlerAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void exceptionCaught(ChannelHandlerContext context, Throwable ex) throws Exception {
|
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||||
if (ex instanceof ClosedChannelException) {
|
if (cause instanceof ClosedChannelException) {
|
||||||
// Ignore
|
// Ignore
|
||||||
} else {
|
} else {
|
||||||
// TODO Actually handle exceptions?
|
super.exceptionCaught(ctx, cause);
|
||||||
System.err.println("[ProtocolLib] Encountered an uncaught exception in the channel pipeline:");
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -821,7 +819,7 @@ public class NettyChannelInjector extends ByteToMessageDecoder implements Channe
|
|||||||
// we end up with a deadlock. The main thread is waiting for the worker thread to process the task, and
|
// we end up with a deadlock. The main thread is waiting for the worker thread to process the task, and
|
||||||
// the worker thread is waiting for the main thread to finish executing PlayerQuitEvent.
|
// the worker thread is waiting for the main thread to finish executing PlayerQuitEvent.
|
||||||
//
|
//
|
||||||
// TLDR: Concurrency is hard.
|
// TL;DR: Concurrency is hard.
|
||||||
executeInChannelThread(new Runnable() {
|
executeInChannelThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren