diff --git a/.pubnub.yml b/.pubnub.yml index d1513f9dd..5b8684ed6 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -1,8 +1,13 @@ name: c-sharp -version: "7.3.1" +version: "7.3.2" schema: 1 scm: github.com/pubnub/c-sharp changelog: + - date: 2025-03-26 + version: v7.3.2 + changes: + - type: improvement + text: "Upgrade newtonsoft json library." - date: 2025-03-18 version: v7.3.1 changes: @@ -850,7 +855,7 @@ features: - QUERY-PARAM supported-platforms: - - version: Pubnub 'C#' 7.3.1 + version: Pubnub 'C#' 7.3.2 platforms: - Windows 10 and up - Windows Server 2008 and up @@ -861,7 +866,7 @@ supported-platforms: - .Net Framework 4.6.1+ - .Net Framework 6.0 - - version: PubnubPCL 'C#' 7.3.1 + version: PubnubPCL 'C#' 7.3.2 platforms: - Xamarin.Android - Xamarin.iOS @@ -881,7 +886,7 @@ supported-platforms: - .Net Core - .Net 6.0 - - version: PubnubUWP 'C#' 7.3.1 + version: PubnubUWP 'C#' 7.3.2 platforms: - Windows Phone 10 - Universal Windows Apps @@ -905,7 +910,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: Pubnub - location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.1.0 + location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.2.0 requires: - name: ".Net" @@ -1188,7 +1193,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: PubNubPCL - location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.1.0 + location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.2.0 requires: - name: ".Net Core" @@ -1547,7 +1552,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: PubnubUWP - location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.1.0 + location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.2.0 requires: - name: "Universal Windows Platform Development" diff --git a/CHANGELOG b/CHANGELOG index 98bb0d8e3..d82dd3d63 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +v7.3.2 - March 26 2025 +----------------------------- +- Modified: upgrade newtonsoft json library. + v7.3.1 - March 18 2025 ----------------------------- - Modified: removed old deprecated logger code. diff --git a/src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager.cs b/src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager.cs index c83a96711..f26896fb0 100644 --- a/src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager.cs +++ b/src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager.cs @@ -272,7 +272,6 @@ private void MultiChannelSubscribeRequest(PNOperationType type, string[] chan } Announce(status); } - // Begin recursive subscribe RequestState pubnubRequestState = null; try { @@ -297,37 +296,48 @@ private void MultiChannelSubscribeRequest(PNOperationType type, string[] chan var transportRequest = PubnubInstance.transportMiddleware.PreapareTransportRequest(requestParameter: subscribeRequestParameter, operationType: PNOperationType.PNSubscribeOperation); OngoingSubscriptionCancellationTokenSources[PubnubInstance.InstanceId] = transportRequest.CancellationTokenSource; - PubnubInstance.transportMiddleware.Send(transportRequest: transportRequest).ContinueWith( t => { - var transportResponse = t.Result; - if (transportResponse.Error == null) { - var json = Encoding.UTF8.GetString(transportResponse.Content); - pubnubRequestState.GotJsonResponse = true; - if (!string.IsNullOrEmpty(json)) { + PubnubInstance.transportMiddleware.Send(transportRequest: transportRequest).ContinueWith(t => + { + if (t is { Result: not null }) + { + var transportResponse = t.Result; + if (transportResponse.Error == null) + { + var json = Encoding.UTF8.GetString(transportResponse.Content); + pubnubRequestState.GotJsonResponse = true; + if (!string.IsNullOrEmpty(json)) + { List result = ProcessJsonResponse(pubnubRequestState, json); logger?.Trace($"result count of ProcessJsonResponse = {result?.Count ?? -1}"); - ProcessResponseCallbacks(result, pubnubRequestState); - - if ((pubnubRequestState.ResponseType == PNOperationType.PNSubscribeOperation || pubnubRequestState.ResponseType == PNOperationType.Presence) && (result != null) && (result.Count > 0)) { + if ((pubnubRequestState.ResponseType == PNOperationType.PNSubscribeOperation || + pubnubRequestState.ResponseType == PNOperationType.Presence) && (result != null) && (result.Count > 0)) + { long jsonTimetoken = GetTimetokenFromMultiplexResult(result); logger?.Trace($"jsonTimetoken = {jsonTimetoken}"); } - if (pubnubRequestState.ResponseType == PNOperationType.PNSubscribeOperation) { + if (pubnubRequestState.ResponseType == PNOperationType.PNSubscribeOperation) + { MultiplexInternalCallback(pubnubRequestState.ResponseType, result); } - } + } + } + else + { + logger?.Error($"Exception from TransportLayer\n error :{transportResponse.Error.Message} \n ${transportResponse.Error.InnerException?.Message}"); + multiplexExceptionTimer?.Change(Timeout.Infinite, Timeout.Infinite); + ConnectionErrors++; + UpdatePubnubNetworkTcpCheckIntervalInSeconds(); + multiplexExceptionTimer = new Timer( + new TimerCallback(MultiplexExceptionHandlerTimerCallback), pubnubRequestState, + (-1 == PubnubNetworkTcpCheckIntervalInSeconds) + ? Timeout.Infinite + : PubnubNetworkTcpCheckIntervalInSeconds * 1000, + Timeout.Infinite); + } } else { - logger?.Error( - "Exception from TransportLayer\n transportResponse.Error.Message => {transportResponse.Error.Message} \n\n\n inner{transportResponse.Error.InnerException?.Message}"); - if (multiplexExceptionTimer != null) { - multiplexExceptionTimer.Change(Timeout.Infinite, Timeout.Infinite); - } - ConnectionErrors++; - UpdatePubnubNetworkTcpCheckIntervalInSeconds(); - multiplexExceptionTimer = new Timer(new TimerCallback(MultiplexExceptionHandlerTimerCallback), pubnubRequestState, - (-1 == PubnubNetworkTcpCheckIntervalInSeconds) ? Timeout.Infinite : PubnubNetworkTcpCheckIntervalInSeconds * 1000, - Timeout.Infinite); + logger?.Debug("Request cancelled"); } }); } catch (Exception ex) { diff --git a/src/Api/PubnubApi/Properties/AssemblyInfo.cs b/src/Api/PubnubApi/Properties/AssemblyInfo.cs index 246c9ffb5..200918c70 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("7.3.1.0")] -[assembly: AssemblyFileVersion("7.3.1.0")] +[assembly: AssemblyVersion("7.3.2.0")] +[assembly: AssemblyFileVersion("7.3.2.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 b526b944b..f5dacad4c 100644 --- a/src/Api/PubnubApi/PubnubApi.csproj +++ b/src/Api/PubnubApi/PubnubApi.csproj @@ -14,7 +14,7 @@ Pubnub - 7.3.1.0 + 7.3.2.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/ - Removed old deprecated logger code. + Upgrade newtonsoft json library. 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 @@ -63,7 +63,7 @@ - + None diff --git a/src/Api/PubnubApiPCL/PubnubApiPCL.csproj b/src/Api/PubnubApiPCL/PubnubApiPCL.csproj index c58449a95..85350f2d8 100644 --- a/src/Api/PubnubApiPCL/PubnubApiPCL.csproj +++ b/src/Api/PubnubApiPCL/PubnubApiPCL.csproj @@ -1,9 +1,8 @@  - netstandard1.3;netstandard1.4;netstandard2.0;net6.0 + netstandard2.0;net6.0 latest - true True pubnub.snk False @@ -15,7 +14,7 @@ PubnubPCL - 7.3.1.0 + 7.3.2.0 PubNub C# .NET - Web Data Push API Pandu Masabathula PubNub @@ -23,25 +22,14 @@ http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png true https://github.com/pubnub/c-sharp/ - Removed old deprecated logger code. + Upgrade newtonsoft json library. 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 PubNub 2012-2021 - - $(PackageTargetFallback);dnxcore50 - - - $(PackageTargetFallback);dnxcore50 - - - $(PackageTargetFallback);dnxcore50 - - False false - @@ -633,30 +621,6 @@ - - $(DefineConstants);NETSTANDARD10 - - - - $(DefineConstants);NETSTANDARD11 - - - - $(DefineConstants);NETSTANDARD13 - - - - $(DefineConstants);NETSTANDARD14 - - - - $(DefineConstants);NETSTANDARD20 - - - - $(DefineConstants);NET60 - - 1701;1702; @@ -669,288 +633,13 @@ - - - - None - - - None - - - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - - - - - None - - - None - - - - - None - - - None - - - None - - - None - - - None - - - - - - - None - - + + None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - - - - - None - - - None - - - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - - - - - None - - - None - - - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - - - - - None - - - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - @@ -1001,16 +690,4 @@ - - diff --git a/src/Api/PubnubApiUWP/PubnubApiUWP.csproj b/src/Api/PubnubApiUWP/PubnubApiUWP.csproj index ab71db96d..f5e01c87d 100644 --- a/src/Api/PubnubApiUWP/PubnubApiUWP.csproj +++ b/src/Api/PubnubApiUWP/PubnubApiUWP.csproj @@ -16,7 +16,7 @@ PubnubUWP - 7.3.1.0 + 7.3.2.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/ - Removed old deprecated logger code. + Upgrade newtonsoft json library. 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 @@ -775,7 +775,7 @@ 6.2.14 - 13.0.1 + 13.0.3 diff --git a/src/Api/PubnubApiUnity/PubnubApiUnity.csproj b/src/Api/PubnubApiUnity/PubnubApiUnity.csproj index 72065cb8c..5164122fc 100644 --- a/src/Api/PubnubApiUnity/PubnubApiUnity.csproj +++ b/src/Api/PubnubApiUnity/PubnubApiUnity.csproj @@ -1,9 +1,8 @@  - net6.0;netstandard1.3;netstandard1.4;netstandard2.0 + net6.0;netstandard2.0 default - true True pubnub.snk False @@ -15,7 +14,7 @@ PubnubApiUnity - 7.3.1.0 + 7.3.2.0 PubNub C# .NET - Web Data Push API Pandu Masabathula PubNub @@ -673,12 +672,19 @@ + + + None + + + + None - + None @@ -720,7 +726,7 @@ None - + None @@ -747,7 +753,7 @@ None - + None @@ -789,118 +795,13 @@ None - - None - - None - - - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - - - - - None - - - None - - - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - - - - + None @@ -917,9 +818,6 @@ None - - None - None @@ -938,15 +836,6 @@ None - - None - - - None - - - None - None @@ -954,7 +843,7 @@ None - + diff --git a/src/UnitTests/PubnubApi.Tests/PubnubApi.Tests.csproj b/src/UnitTests/PubnubApi.Tests/PubnubApi.Tests.csproj index 066466d81..749bb3b73 100644 --- a/src/UnitTests/PubnubApi.Tests/PubnubApi.Tests.csproj +++ b/src/UnitTests/PubnubApi.Tests/PubnubApi.Tests.csproj @@ -38,7 +38,7 @@ - + None diff --git a/src/UnitTests/PubnubApiPCL.Tests/PubnubApiPCL.Tests.csproj b/src/UnitTests/PubnubApiPCL.Tests/PubnubApiPCL.Tests.csproj index 7991b1213..3ed54dad0 100644 --- a/src/UnitTests/PubnubApiPCL.Tests/PubnubApiPCL.Tests.csproj +++ b/src/UnitTests/PubnubApiPCL.Tests/PubnubApiPCL.Tests.csproj @@ -101,7 +101,7 @@ - + None