[#582] Widen synchronized block for packet queue.
This commit is contained in:
parent
cbcd874d47
commit
79d04bec2e
@ -89,13 +89,13 @@ public class BungeeServerInfo implements ServerInfo
|
|||||||
Preconditions.checkNotNull( channel, "channel" );
|
Preconditions.checkNotNull( channel, "channel" );
|
||||||
Preconditions.checkNotNull( data, "data" );
|
Preconditions.checkNotNull( data, "data" );
|
||||||
|
|
||||||
|
synchronized ( packetQueue )
|
||||||
|
{
|
||||||
Server server = ( players.isEmpty() ) ? null : players.iterator().next().getServer();
|
Server server = ( players.isEmpty() ) ? null : players.iterator().next().getServer();
|
||||||
if ( server != null )
|
if ( server != null )
|
||||||
{
|
{
|
||||||
server.sendData( channel, data );
|
server.sendData( channel, data );
|
||||||
} else
|
} else
|
||||||
{
|
|
||||||
synchronized ( packetQueue )
|
|
||||||
{
|
{
|
||||||
packetQueue.add( new PacketFAPluginMessage( channel, data ) );
|
packetQueue.add( new PacketFAPluginMessage( channel, data ) );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user