From 56533c6259eb36cfd38ac4fba0713c3329df3917 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 23 May 2013 13:49:20 +1000 Subject: [PATCH] Close issue #374 - take a lock when checking channel state / writing --- proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java b/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java index 055584ee..983dcf7f 100644 --- a/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java +++ b/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java @@ -15,7 +15,7 @@ public class ChannelWrapper this.ch = ch; } - public void write(Object packet) + public synchronized void write(Object packet) { if ( !closed ) { @@ -23,7 +23,7 @@ public class ChannelWrapper } } - public void close() + public synchronized void close() { if ( !closed ) {