diff --git a/Packages/Nakama/CHANGELOG.md b/Packages/Nakama/CHANGELOG.md index 348d6e9c..ed0851df 100644 --- a/Packages/Nakama/CHANGELOG.md +++ b/Packages/Nakama/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project are documented below. The format is based on [keep a changelog](http://keepachangelog.com/) and this project uses [semantic versioning](http://semver.org/). +### [Unreleased] + +## [3.10.0] - 2023-11-21 + +### Changed +- Updated to use the Nakama and Satori .NET 3.9.0 release. +- Restricted retry attempts to more specific 500-level error codes from the server. + ## [3.9.0] - 2023-08-11 ### Changed - Updated to use the Nakama and Satori .NET 3.9.0 release. diff --git a/Packages/Nakama/Runtime/Plugins/Nakama.dll b/Packages/Nakama/Runtime/Plugins/Nakama.dll index 4c0442db..b8008c09 100644 Binary files a/Packages/Nakama/Runtime/Plugins/Nakama.dll and b/Packages/Nakama/Runtime/Plugins/Nakama.dll differ diff --git a/Packages/Nakama/Runtime/Plugins/Satori.dll b/Packages/Nakama/Runtime/Plugins/Satori.dll index 0dcabae2..0fbc8a8f 100644 Binary files a/Packages/Nakama/Runtime/Plugins/Satori.dll and b/Packages/Nakama/Runtime/Plugins/Satori.dll differ diff --git a/Packages/Nakama/Runtime/UnityWebRequestAdapter.cs b/Packages/Nakama/Runtime/UnityWebRequestAdapter.cs index ba512af7..b84d0676 100644 --- a/Packages/Nakama/Runtime/UnityWebRequestAdapter.cs +++ b/Packages/Nakama/Runtime/UnityWebRequestAdapter.cs @@ -178,7 +178,19 @@ private static bool IsNetworkError(UnityWebRequest www) private static bool IsTransientException(Exception e) { - return e is ApiResponseException apiException && (apiException.StatusCode >= 500 || apiException.StatusCode == -1); + if (e is ApiResponseException apiException) + { + switch (apiException.StatusCode) + { + case 500: // Internal Server Error often (but not always) indicates a transient issue in Nakama, e.g., DB connectivity. + case 502: // LB returns this to client if server sends corrupt/invalid data to LB, which may be a transient issue. + case 503: // LB returns this to client if LB determines or is told that server is unable to handle forwarded from LB, which may be a transient issue. + case 504: // LB returns this to client if LB cannot communicate with server, which may be a temporary issue. + return true; + } + } + + return false; } } } diff --git a/Packages/Nakama/package.json b/Packages/Nakama/package.json index d6f36a99..ab5d4886 100644 --- a/Packages/Nakama/package.json +++ b/Packages/Nakama/package.json @@ -1,6 +1,6 @@ { "name": "com.heroiclabs.nakama-unity", - "version": "3.9.0", + "version": "3.10.0", "unity": "2018.4", "displayName": "Nakama Unity", "description": "Unity3D client for Nakama server written in C#.",