This PR adds support for automatic retries of failed requests. A retry policy can either defined globally and/or set per request:
local retries = require "nakama.util.retries"
-- use a global retry policy with 5 attempts with 1 second intervals
local config = {
host = "127.0.0.1",
port = 7350,
username = "defaultkey",
password = "",
retry_policy = retries.fixed(5, 1),
engine = defold,
}
local client = nakama.create_client(config)
-- use a retry policy specifically for this request
-- 5 retries at intervals increasing by 1 second between attempts (eg 1s, 2s, 3s, 4s, 5s)
nakama.list_friends(client, 10, 0, "", retries.incremental(5, 1))
This PR adds support for automatic retries of failed requests. A retry policy can either defined globally and/or set per request:
Fixes #39