mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-15 10:45:35 +01:00
Exclude ConnectException from networking setting as well
This commit is contained in:
parent
ea00d1cad0
commit
03c0e99b27
@ -28,6 +28,7 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import java.net.ConnectException;
|
||||
import java.net.SocketException;
|
||||
|
||||
@Mixin(ClientConnection.class)
|
||||
@ -36,7 +37,7 @@ public abstract class MixinClientConnection {
|
||||
@Inject(method = "exceptionCaught", at = @At("HEAD"))
|
||||
private void printNetworkingErrors(ChannelHandlerContext context, Throwable ex, CallbackInfo ci) {
|
||||
if (DebugSettings.global().printNetworkingErrorsToLogs.getValue()) {
|
||||
if (ex instanceof SocketException) {
|
||||
if (ex instanceof SocketException || ex instanceof ConnectException) {
|
||||
// Thrown when server is not reachable
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user