2017-10-08 20:57:57 +02:00
|
|
|
From 051b62a81dccad2c628eedc59bdfbf212a968131 Mon Sep 17 00:00:00 2001
|
2016-05-28 18:34:39 +02:00
|
|
|
From: Techcable <Techcable@techcable.net>
|
|
|
|
Date: Tue, 5 Apr 2016 11:00:16 -0700
|
|
|
|
Subject: [PATCH] Print stack trace when the ByteBuf is not direct.
|
|
|
|
|
|
|
|
The issue with ByteBufs not being direct should be fixed as of netty 4.1, and stacktraces provide valuable information.
|
|
|
|
|
|
|
|
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/Varint21FrameDecoder.java b/protocol/src/main/java/net/md_5/bungee/protocol/Varint21FrameDecoder.java
|
2017-10-08 20:57:57 +02:00
|
|
|
index 29e54dba..6da27fcf 100644
|
2016-05-28 18:34:39 +02:00
|
|
|
--- a/protocol/src/main/java/net/md_5/bungee/protocol/Varint21FrameDecoder.java
|
|
|
|
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/Varint21FrameDecoder.java
|
|
|
|
@@ -51,7 +51,7 @@ public class Varint21FrameDecoder extends ByteToMessageDecoder
|
|
|
|
if ( !DIRECT_WARNING )
|
|
|
|
{
|
|
|
|
DIRECT_WARNING = true;
|
|
|
|
- System.out.println( "Netty is not using direct IO buffers." );
|
|
|
|
+ new Throwable("Using a " + in.getClass().getTypeName() + ", not a direct byte buf!").printStackTrace();
|
|
|
|
}
|
|
|
|
|
|
|
|
// See https://github.com/SpigotMC/BungeeCord/issues/1717
|
|
|
|
--
|
2017-10-08 20:57:57 +02:00
|
|
|
2.14.1
|
2016-05-28 18:34:39 +02:00
|
|
|
|