Prevent game server pinger from dying if there's a network interruption; like computer going to sleep

This commit is contained in:
2026-10-29 18:13:25 -05:00
parent ff9fcc5b5f
commit 6ac2477803

View File

@@ -200,6 +200,9 @@ module W3DHubLauncher
msg = [8, 0, 0, 0, sequence_id].flatten.pack("C2n2A64")
echo_requests[sequence_id] = { send_time: Time.now, address: server_address, replied: false }
socket.send(msg, 0, address)
rescue Errno::ENETUNREACH
# network was unreachable, cleanup
echo_requests.delete(sequence_id)
end
# Receive replies until timeout