Skip to content

Commit

Permalink
add message about split tunneling for WSAEADDRNOTAVAIL
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam- committed Mar 14, 2024
1 parent bd52052 commit 131d675
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/main/java/net/runelite/launcher/FatalErrorDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,20 @@ public static void showNetErrorWindow(String action, Throwable err)

if (err instanceof SocketException) // includes ConnectException
{
new FatalErrorDialog(formatExceptionMessage("RuneLite is unable to connect to a required server while " + action + ". " +
"Please check your internet connection.", err))
String message = "RuneLite is unable to connect to a required server while " + action + ".";

// hardcoded error message from PlainSocketImpl.c for WSAEADDRNOTAVAIL
if (err.getMessage().equals("connect: Address is invalid on local machine, or port is not valid on remote machine"))
{
message += " Cannot assign requested address. This error is most commonly caused by \"split tunneling\" support in VPN software." +
" If you are using a VPN, try turning \"split tunneling\" off.";
}
else
{
message += " Please check your internet connection.";
}

new FatalErrorDialog(formatExceptionMessage(message, err))
.open();
return;
}
Expand Down

0 comments on commit 131d675

Please sign in to comment.