Close issue #374 - take a lock when checking channel state / writing

This commit is contained in:
md_5 2013-05-23 13:49:20 +10:00
parent 4cb46c6e5c
commit 56533c6259

View File

@ -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 )
{