Fix problem with network connections timing out frequently. Turns out

there's a race condition - and the extra work forge does causes it to
happen much more frequently than vanilla (though I'm sure it's a vanilla
issue). Closes #6124, #5767 and probably lots more.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
cpw 2019-09-07 18:42:50 -04:00
parent fc5573333d
commit b6cd19b4ae
No known key found for this signature in database
GPG key ID: 8EB3DF749553B1B7

View file

@ -16,6 +16,15 @@
try { try {
this.func_150723_a(ProtocolType.HANDSHAKING); this.func_150723_a(ProtocolType.HANDSHAKING);
@@ -173,7 +175,7 @@
++this.field_211395_r;
if (protocoltype1 != protocoltype) {
field_150735_g.debug("Disabled auto read");
- this.field_150746_k.config().setAutoRead(false);
+ this.field_150746_k.eventLoop().execute(()->this.field_150746_k.config().setAutoRead(false));
}
if (this.field_150746_k.eventLoop().inEventLoop()) {
@@ -257,7 +259,9 @@ @@ -257,7 +259,9 @@
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)