mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-24 03:05:49 +01:00
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