Close issue #374 - take a lock when checking channel state / writing
This commit is contained in:
@@ -15,7 +15,7 @@ public class ChannelWrapper
|
|||||||
this.ch = ch;
|
this.ch = ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void write(Object packet)
|
public synchronized void write(Object packet)
|
||||||
{
|
{
|
||||||
if ( !closed )
|
if ( !closed )
|
||||||
{
|
{
|
||||||
@@ -23,7 +23,7 @@ public class ChannelWrapper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void close()
|
public synchronized void close()
|
||||||
{
|
{
|
||||||
if ( !closed )
|
if ( !closed )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user