Skip to content

Commit

Permalink
Force IPv4 ping in start-automated-server.bat
Browse files Browse the repository at this point in the history
Ping does not respond with a TTL if the server responds with an IPv6
address. This essentially means that the script will think the user does
not have internet, if they have a public IPv6 address. Forcing IPv4 in
the ping command, ensures TTL gets returned, and the startup can
proceed.

Closes EnigmaticaModpacks#4043
  • Loading branch information
algorythm committed Jan 12, 2022
1 parent d363897 commit 9bcbbce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion automation/start-automated-server.bat
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ IF NOT %MC_SERVER_IGNORE_OFFLINE% EQU 0 (
)

REM Ping minecraftforge before attempting download
%MC_SYS32%\PING.EXE -n 2 -w 1000 minecraftforge.net | %MC_SYS32%\FIND.EXE "TTL=" 1>> "%~dp0logs\serverstart.log" 2>&1
%MC_SYS32%\PING.EXE -n 2 -w 1000 minecraftforge.net -4 | %MC_SYS32%\FIND.EXE "TTL=" 1>> "%~dp0logs\serverstart.log" 2>&1
IF %ERRORLEVEL% EQU 0 (
ECHO INFO: Ping of "minecraftforge.net" Successfull 1>> "%~dp0logs\serverstart.log" 2>&1
) ELSE (
Expand Down

0 comments on commit 9bcbbce

Please sign in to comment.