mirror of
https://git.zelz.net/catfoolyou/Project164.git
synced 2025-12-14 08:57:42 +00:00
Connection works but bugged
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
package net.md_5.bungee.netty;
|
||||
|
||||
import io.netty.buffer.Unpooled;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
@@ -19,7 +20,12 @@ public class ChannelWrapper {
|
||||
|
||||
public synchronized void write(final Object packet) {
|
||||
if (!this.closed) {
|
||||
this.ch.write(packet);
|
||||
if(packet instanceof byte[]){
|
||||
this.ch.write(Unpooled.wrappedBuffer((byte[]) packet));
|
||||
}else {
|
||||
this.ch.write(packet);
|
||||
}
|
||||
|
||||
ch.unsafe().flushNow();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user