Close issue #374 - take a lock when checking channel state / writing
This commit is contained in:
parent
4cb46c6e5c
commit
56533c6259
@ -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 )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user