2015-03-22 17:38:04 +00:00
|
|
|
--- ../src-base/minecraft/cpw/mods/fml/common/network/internal/HandshakeCompletionHandler.java
|
|
|
|
+++ ../src-work/minecraft/cpw/mods/fml/common/network/internal/HandshakeCompletionHandler.java
|
2015-06-01 11:30:50 +00:00
|
|
|
@@ -13,8 +13,14 @@
|
2015-03-22 17:38:04 +00:00
|
|
|
@Override
|
|
|
|
protected void channelRead0(ChannelHandlerContext ctx, CompleteHandshake msg) throws Exception
|
|
|
|
{
|
2015-06-01 11:30:50 +00:00
|
|
|
- NetworkDispatcher dispatcher = ctx.channel().attr(NetworkDispatcher.FML_DISPATCHER).getAndRemove();
|
|
|
|
- dispatcher.completeHandshake(msg.target);
|
2015-03-22 17:38:04 +00:00
|
|
|
+ // Cauldron start - attempt to fix race condition with attr being null
|
2015-06-01 11:30:50 +00:00
|
|
|
+ io.netty.util.Attribute<NetworkDispatcher> attr = ctx.channel().attr(NetworkDispatcher.FML_DISPATCHER);
|
2015-03-22 17:38:04 +00:00
|
|
|
+ if (attr != null)
|
|
|
|
+ {
|
2015-06-01 14:32:10 +00:00
|
|
|
+ NetworkDispatcher dispatcher = attr.getAndRemove();
|
|
|
|
+ if (dispatcher != null) dispatcher.completeHandshake(msg.target);
|
2015-06-01 11:30:50 +00:00
|
|
|
+ }
|
2015-03-22 17:38:04 +00:00
|
|
|
+ // Cauldron end
|
2015-06-01 11:30:50 +00:00
|
|
|
}
|
2015-03-22 17:38:04 +00:00
|
|
|
|
|
|
|
@Override
|