Enigmatica 2: Expert - E2E

Enigmatica 2: Expert - E2E

2M Downloads

ServerStartLinux.sh hangs on ping inside of check_connection

malcom2073 opened this issue ยท 10 comments

commented

https://github.com/NillerMedDild/Enigmatica2Expert/blob/0243681ebf5004ef5daef4ff27c2db2ab8a4bae1/ServerStartLinux.sh#L165

The old version (1.82a) had "ping -c 1" which exited after one success or failure, but this version does not, so it hangs, continuously pinging 8.8.8.8 and never continuing on. The next ping test is also missing -c 1

Adding -c 1 to both commands allows the script to operate as expected. Unsure if you want pull requests without issue tickets first.

commented

I think that'd be overcomplicating the script to be honest. I'd rather forfit Windows-bash support, or remove the connectivity check entirely.

commented

Ah I didn't think about that, ping on windows doesn't like the -c flag. There are some ways to find out from bash if a system is WSL or *nix: microsoft/WSL#4555 and then maybe adjust the flags based on that? None of these seem particularly universally acceptable.

commented

Thanks for the report. I'm not seeing that behaviour, it runs just fine on my PC.
Which OS are you running?

commented

Curious, What OS are you running? I'm on Ubuntu 20.04

commented

Windows 10, I guess my installation of bash differs from native Unix?

commented

Ah yep, it probably uses ping.exe rather than posix ping. ping.exe exits after 4 pings without any additional command line arguments, whereas any posix based ping will run forever

commented

Hmm I did not do that right

commented

Ah, it does not work on Windows with that change :(

commented

Either way, thanks for all of your efforts!

commented

My pleasure, thanks for the report and fix :D