mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-25 01:57:55 +01:00
Fix possible race condition with regards to abandoning servers
This commit is contained in:
parent
daa58ffe58
commit
8c2bea5be2
@ -48,6 +48,7 @@ public class DownstreamBridge extends PacketHandler
|
|||||||
ServerInfo def = bungee.getServerInfo( con.getPendingConnection().getListener().getFallbackServer() );
|
ServerInfo def = bungee.getServerInfo( con.getPendingConnection().getListener().getFallbackServer() );
|
||||||
if ( server.getInfo() != def )
|
if ( server.getInfo() != def )
|
||||||
{
|
{
|
||||||
|
server.setObsolete( true );
|
||||||
con.connectNow( def );
|
con.connectNow( def );
|
||||||
con.sendMessage( ChatColor.RED + "The server you were previously on went down, you have been connected to the lobby" );
|
con.sendMessage( ChatColor.RED + "The server you were previously on went down, you have been connected to the lobby" );
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user