mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2026-11-03 16:44:05 +00:00
Prevent game server pinger from dying if there's a network interruption; like computer going to sleep
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user