From 16126ddaa56fdc6b19b65be5c8e90f84a35b2627 Mon Sep 17 00:00:00 2001 From: Mohit Tejani <60129002+mohitpubnub@users.noreply.github.com> Date: Tue, 2 Apr 2024 18:22:00 +0530 Subject: [PATCH] CLEN-1936: Fix status category in no network condition (#213) * Fix innacurate DateTime to Unix nanoseconds conversion * Improve DateTime/Unix conversion unit tests + add new one * fix: emit correct status category in no netrowk condition * PubNub SDK v6.19.7.0 release. --------- Co-authored-by: PUBNUB\jakub.grzesiowski Co-authored-by: PubNub Release Bot <120067856+pubnub-release-bot@users.noreply.github.com> --- .pubnub.yml | 19 ++++++++++++------- CHANGELOG | 4 ++++ .../EndPoint/PubSub/SubscribeManager.cs | 2 +- src/Api/PubnubApi/Properties/AssemblyInfo.cs | 4 ++-- src/Api/PubnubApi/PubnubApi.csproj | 4 ++-- src/Api/PubnubApiPCL/PubnubApiPCL.csproj | 4 ++-- src/Api/PubnubApiUWP/PubnubApiUWP.csproj | 4 ++-- src/Api/PubnubApiUnity/PubnubApiUnity.csproj | 2 +- 8 files changed, 26 insertions(+), 17 deletions(-) diff --git a/.pubnub.yml b/.pubnub.yml index 5a2b7c1a9..b1f396a36 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -1,8 +1,13 @@ name: c-sharp -version: "6.19.6" +version: "6.19.7" schema: 1 scm: github.com/pubnub/c-sharp changelog: + - date: 2024-04-02 + version: v6.19.7 + changes: + - type: bug + text: "Resolved the issue where an incorrect network status was emitted when no internet connection was detected." - date: 2024-03-28 version: v6.19.6 changes: @@ -771,7 +776,7 @@ features: - QUERY-PARAM supported-platforms: - - version: Pubnub 'C#' 6.19.6 + version: Pubnub 'C#' 6.19.7 platforms: - Windows 10 and up - Windows Server 2008 and up @@ -781,7 +786,7 @@ supported-platforms: - .Net Framework 4.5 - .Net Framework 4.6.1+ - - version: PubnubPCL 'C#' 6.19.6 + version: PubnubPCL 'C#' 6.19.7 platforms: - Xamarin.Android - Xamarin.iOS @@ -801,7 +806,7 @@ supported-platforms: - .Net Core - .Net 6.0 - - version: PubnubUWP 'C#' 6.19.6 + version: PubnubUWP 'C#' 6.19.7 platforms: - Windows Phone 10 - Universal Windows Apps @@ -825,7 +830,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: Pubnub - location: https://github.com/pubnub/c-sharp/releases/tag/v6.19.6.0 + location: https://github.com/pubnub/c-sharp/releases/tag/v6.19.7.0 requires: - name: ".Net" @@ -1108,7 +1113,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: PubNubPCL - location: https://github.com/pubnub/c-sharp/releases/tag/v6.19.6.0 + location: https://github.com/pubnub/c-sharp/releases/tag/v6.19.7.0 requires: - name: ".Net Core" @@ -1467,7 +1472,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: PubnubUWP - location: https://github.com/pubnub/c-sharp/releases/tag/v6.19.6.0 + location: https://github.com/pubnub/c-sharp/releases/tag/v6.19.7.0 requires: - name: "Universal Windows Platform Development" diff --git a/CHANGELOG b/CHANGELOG index 4e761d3db..696be9708 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +v6.19.7 - April 02 2024 +----------------------------- +- Fixed: resolved the issue where an incorrect network status was emitted when no internet connection was detected. + v6.19.6 - March 28 2024 ----------------------------- - Fixed: fixes issue of inaccurate DateTime to TimeToken conversion in TranslateDateTimeToPubnubUnixNanoSeconds. diff --git a/src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager.cs b/src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager.cs index 8480133d2..ef3305bb3 100644 --- a/src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager.cs +++ b/src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager.cs @@ -1213,7 +1213,7 @@ protected void ReconnectNetworkCallback(System.Object reconnectState) if (netState.Channels != null && netState.Channels.Length > 0) { - PNStatus status = new StatusBuilder(config.ContainsKey(PubnubInstance.InstanceId) ? config[PubnubInstance.InstanceId] : null, jsonLibrary).CreateStatusResponse(netState.ResponseType, PNStatusCategory.PNReconnectedCategory, null, (int)System.Net.HttpStatusCode.NotFound, new PNException("Internet connection problem. Retrying connection")); + PNStatus status = new StatusBuilder(config.ContainsKey(PubnubInstance.InstanceId) ? config[PubnubInstance.InstanceId] : null, jsonLibrary).CreateStatusResponse(netState.ResponseType, PNStatusCategory.PNNetworkIssuesCategory, null, (int)System.Net.HttpStatusCode.NotFound, new PNException("Internet connection problem. Retrying connection")); if (netState.Channels != null && netState.Channels.Length > 0) { status.AffectedChannels.AddRange(netState.Channels.ToList()); diff --git a/src/Api/PubnubApi/Properties/AssemblyInfo.cs b/src/Api/PubnubApi/Properties/AssemblyInfo.cs index f163eda0e..f00a4a338 100644 --- a/src/Api/PubnubApi/Properties/AssemblyInfo.cs +++ b/src/Api/PubnubApi/Properties/AssemblyInfo.cs @@ -11,8 +11,8 @@ [assembly: AssemblyProduct("Pubnub C# SDK")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("6.19.6.0")] -[assembly: AssemblyFileVersion("6.19.6.0")] +[assembly: AssemblyVersion("6.19.7.0")] +[assembly: AssemblyFileVersion("6.19.7.0")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. diff --git a/src/Api/PubnubApi/PubnubApi.csproj b/src/Api/PubnubApi/PubnubApi.csproj index 51aecc4e6..8d2f0e746 100644 --- a/src/Api/PubnubApi/PubnubApi.csproj +++ b/src/Api/PubnubApi/PubnubApi.csproj @@ -14,7 +14,7 @@ Pubnub - 6.19.6.0 + 6.19.7.0 PubNub C# .NET - Web Data Push API Pandu Masabathula PubNub @@ -22,7 +22,7 @@ http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png true https://github.com/pubnub/c-sharp/ - Fixes issue of inaccurate DateTime to TimeToken conversion in TranslateDateTimeToPubnubUnixNanoSeconds. + Resolved the issue where an incorrect network status was emitted when no internet connection was detected. Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing PubNub is a Massively Scalable Web Push Service for Web and Mobile Games. This is a cloud-based service for broadcasting messages to thousands of web and mobile clients simultaneously diff --git a/src/Api/PubnubApiPCL/PubnubApiPCL.csproj b/src/Api/PubnubApiPCL/PubnubApiPCL.csproj index 1a0392d55..936976912 100644 --- a/src/Api/PubnubApiPCL/PubnubApiPCL.csproj +++ b/src/Api/PubnubApiPCL/PubnubApiPCL.csproj @@ -15,7 +15,7 @@ PubnubPCL - 6.19.6.0 + 6.19.7.0 PubNub C# .NET - Web Data Push API Pandu Masabathula PubNub @@ -23,7 +23,7 @@ http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png true https://github.com/pubnub/c-sharp/ - Fixes issue of inaccurate DateTime to TimeToken conversion in TranslateDateTimeToPubnubUnixNanoSeconds. + Resolved the issue where an incorrect network status was emitted when no internet connection was detected. Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing PubNub is a Massively Scalable Web Push Service for Web and Mobile Games. This is a cloud-based service for broadcasting messages to thousands of web and mobile clients simultaneously diff --git a/src/Api/PubnubApiUWP/PubnubApiUWP.csproj b/src/Api/PubnubApiUWP/PubnubApiUWP.csproj index 4ef4abe57..c24bc1fc2 100644 --- a/src/Api/PubnubApiUWP/PubnubApiUWP.csproj +++ b/src/Api/PubnubApiUWP/PubnubApiUWP.csproj @@ -16,7 +16,7 @@ PubnubUWP - 6.19.6.0 + 6.19.7.0 PubNub C# .NET - Web Data Push API Pandu Masabathula PubNub @@ -24,7 +24,7 @@ http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png true https://github.com/pubnub/c-sharp/ - Fixes issue of inaccurate DateTime to TimeToken conversion in TranslateDateTimeToPubnubUnixNanoSeconds. + Resolved the issue where an incorrect network status was emitted when no internet connection was detected. Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing PubNub is a Massively Scalable Web Push Service for Web and Mobile Games. This is a cloud-based service for broadcasting messages to thousands of web and mobile clients simultaneously diff --git a/src/Api/PubnubApiUnity/PubnubApiUnity.csproj b/src/Api/PubnubApiUnity/PubnubApiUnity.csproj index 38c66e62b..401282721 100644 --- a/src/Api/PubnubApiUnity/PubnubApiUnity.csproj +++ b/src/Api/PubnubApiUnity/PubnubApiUnity.csproj @@ -15,7 +15,7 @@ PubnubApiUnity - 6.19.6.0 + 6.19.7.0 PubNub C# .NET - Web Data Push API Pandu Masabathula PubNub