Removed dependence on the bsdtar command, fixed Play Now button not doing anything if a server nickname wasn't set, refactor a bit so that the Server List's 'Join Server' button functionality can be reused for the Play Now button, installer now always unpacks into 'data/*' instead of 'Data/*'

This commit is contained in:
2022-12-02 14:12:45 -06:00
parent 19a15e937e
commit 55c0f363e0
8 changed files with 126 additions and 96 deletions

View File

@@ -45,7 +45,18 @@ class W3DHub
end
begin
Excon.post(url, headers: headers, body: body, tcp_nodelay: true, write_timeout: API_TIMEOUT, read_timeout: API_TIMEOUT, connection_timeout: API_TIMEOUT)
Excon.post(
url,
headers: headers,
body: body,
tcp_nodelay: true,
write_timeout: API_TIMEOUT,
read_timeout: API_TIMEOUT,
connection_timeout: API_TIMEOUT,
idempotent: true,
retry_limit: 6,
retry_interval: 5
)
rescue Excon::Errors::Timeout
logger.error(LOG_TAG) { "Connection to \"#{url}\" timed out after: #{API_TIMEOUT} seconds" }
DummyResponse.new
@@ -233,7 +244,7 @@ class W3DHub
logger.debug(LOG_TAG) { "Fetching GET \"#{url}\"..." }
Excon.get(url, headers: headers, body: body, persistent: true)
Excon.get(url, headers: headers, body: body, persistent: true, idempotent: true, retry_limit: 6, retry_interval: 5)
end
# Method: GET