diff --git a/.pubnub.yml b/.pubnub.yml index ac6ce31e0..a040ba92e 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -1,8 +1,13 @@ name: c-sharp -version: "6.0.0" +version: "6.1.0" schema: 1 scm: github.com/pubnub/c-sharp changelog: + - date: 2022-01-20 + version: v6.1.0 + changes: + - type: bug + text: "Capture region when exception occur during subscribe." - date: 2022-01-12 version: v6.0.0 changes: @@ -626,7 +631,7 @@ features: - QUERY-PARAM supported-platforms: - - version: Pubnub 'C#' 6.0.0 + version: Pubnub 'C#' 6.1.0 platforms: - Windows 10 and up - Windows Server 2008 and up @@ -636,7 +641,7 @@ supported-platforms: - .Net Framework 4.5 - .Net Framework 4.6.1+ - - version: PubnubPCL 'C#' 6.0.0 + version: PubnubPCL 'C#' 6.1.0 platforms: - Xamarin.Android - Xamarin.iOS @@ -655,7 +660,7 @@ supported-platforms: - .Net Standard 2.1 - .Net Core - - version: PubnubUWP 'C#' 6.0.0 + version: PubnubUWP 'C#' 6.1.0 platforms: - Windows Phone 10 - Universal Windows Apps @@ -679,7 +684,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: Pubnub - location: https://github.com/pubnub/c-sharp/releases/tag/v6.0.0.0 + location: https://github.com/pubnub/c-sharp/releases/tag/v6.1.0.0 requires: - name: ".Net" @@ -976,7 +981,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: PubNubPCL - location: https://github.com/pubnub/c-sharp/releases/tag/v6.0.0.0 + location: https://github.com/pubnub/c-sharp/releases/tag/v6.1.0.0 requires: - name: ".Net Core" @@ -1349,7 +1354,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: PubnubUWP - location: https://github.com/pubnub/c-sharp/releases/tag/v6.0.0.0 + location: https://github.com/pubnub/c-sharp/releases/tag/v6.1.0.0 requires: - name: "Universal Windows Platform Development" diff --git a/CHANGELOG b/CHANGELOG index 7453a321b..3f693a8cf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +v6.1.0 - January 20 2022 +----------------------------- +- Fixed: capture region when exception occur during subscribe. + v6.0.0 - January 12 2022 ----------------------------- - BREAKING CHANGES: UUID is mandatory to use SDK. diff --git a/src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager.cs b/src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager.cs index a2dcad83a..cecee8a08 100644 --- a/src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager.cs +++ b/src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager.cs @@ -783,7 +783,16 @@ private void MultiplexExceptionHandler(PNOperationType type, string[] channel } else { - result.Add(LastSubscribeTimetoken[PubnubInstance.InstanceId]); //get last timetoken of the current instance + long lastTT = LastSubscribeTimetoken[PubnubInstance.InstanceId]; //get last timetoken of the current instance + int lastRegionId = (LastSubscribeRegion != null && LastSubscribeRegion.ContainsKey(PubnubInstance.InstanceId)) ? LastSubscribeRegion[PubnubInstance.InstanceId] : 0; //get last region of the current instance + + Dictionary dictTimetokenAndRegion = new Dictionary(); + dictTimetokenAndRegion.Add("t", lastTT); + dictTimetokenAndRegion.Add("r", lastRegionId); + + Dictionary dictEnvelope = new Dictionary(); + dictEnvelope.Add("t", dictTimetokenAndRegion); + result.Add(dictEnvelope); } if (channelGroups != null && channelGroups.Length > 0) @@ -831,7 +840,7 @@ private void MultiplexInternalCallback(PNOperationType type, object multiplex int region = GetRegionFromMultiplexResult(message); Task.Factory.StartNew(() => { - LoggingMethod.WriteToLog(pubnubLog, string.Format("DateTime {0} MultiplexInternalCallback timetoken = {1}", DateTime.Now.ToString(CultureInfo.InvariantCulture), timetoken), config.LogVerbosity); + LoggingMethod.WriteToLog(pubnubLog, string.Format("DateTime {0} MultiplexInternalCallback timetoken = {1}; region = {2}", DateTime.Now.ToString(CultureInfo.InvariantCulture), timetoken, region), config.LogVerbosity); MultiChannelSubscribeRequest(type, channels, channelGroups, timetoken, region, false, null, this.customQueryParam); }, CancellationToken.None, TaskCreationOptions.PreferFairness, TaskScheduler.Default).ConfigureAwait(false); } diff --git a/src/Api/PubnubApi/Properties/AssemblyInfo.cs b/src/Api/PubnubApi/Properties/AssemblyInfo.cs index ca437cbfa..4486dd98f 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.0.0.0")] -[assembly: AssemblyFileVersion("6.0.0.0")] +[assembly: AssemblyVersion("6.1.0.0")] +[assembly: AssemblyFileVersion("6.1.0.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 f179ca518..797e7dd50 100644 --- a/src/Api/PubnubApi/PubnubApi.csproj +++ b/src/Api/PubnubApi/PubnubApi.csproj @@ -13,7 +13,7 @@ Pubnub - 6.0.0.0 + 6.1.0.0 PubNub C# .NET - Web Data Push API Pandu Masabathula PubNub @@ -21,7 +21,7 @@ http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png true https://github.com/pubnub/c-sharp/ - BREAKING CHANGES: UUID is mandatory to use SDK. + Capture region when exception occur during subscribe. 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 a535ea5ac..3c3a682eb 100644 --- a/src/Api/PubnubApiPCL/PubnubApiPCL.csproj +++ b/src/Api/PubnubApiPCL/PubnubApiPCL.csproj @@ -14,7 +14,7 @@ PubnubPCL - 6.0.0.0 + 6.1.0.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/ - BREAKING CHANGES: UUID is mandatory to use SDK. + Capture region when exception occur during subscribe. 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 56898dfdc..7cacc0091 100644 --- a/src/Api/PubnubApiUWP/PubnubApiUWP.csproj +++ b/src/Api/PubnubApiUWP/PubnubApiUWP.csproj @@ -15,7 +15,7 @@ PubnubUWP - 6.0.0.0 + 6.1.0.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/ - BREAKING CHANGES: UUID is mandatory to use SDK. + Capture region when exception occur during subscribe. 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