Fix potential rance condition in connecting to vanilla servers as well. And move latch into client side only.
This commit is contained in:
parent
18aed8bf1b
commit
3cb3988491
2 changed files with 3 additions and 1 deletions
|
@ -834,9 +834,9 @@ public class FMLClientHandler implements IFMLSidedHandler
|
|||
@Override
|
||||
public void fireNetRegistrationEvent(EventBus bus, NetworkManager manager, Set<String> channelSet, String channel, Side side)
|
||||
{
|
||||
waitForPlayClient();
|
||||
if (side == Side.CLIENT)
|
||||
{
|
||||
waitForPlayClient();
|
||||
bus.post(new FMLNetworkEvent.CustomPacketRegistrationEvent<NetHandlerPlayClient>(manager, channelSet, channel, side, NetHandlerPlayClient.class));
|
||||
}
|
||||
else
|
||||
|
|
|
@ -29,6 +29,7 @@ import net.minecraft.network.play.server.S3FPacketCustomPayload;
|
|||
import net.minecraft.network.play.server.S40PacketDisconnect;
|
||||
import net.minecraft.server.management.ServerConfigurationManager;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec;
|
||||
|
@ -448,6 +449,7 @@ public class NetworkDispatcher extends SimpleChannelInboundHandler<Packet> imple
|
|||
|
||||
public void abortClientHandshake(String type)
|
||||
{
|
||||
FMLClientHandler.instance().waitForPlayClient();
|
||||
completeClientSideConnection(ConnectionType.valueOf(type));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue