diff --git a/.pubnub.yml b/.pubnub.yml index 0bba21805..02fdc5510 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -1,8 +1,13 @@ name: c-sharp -version: "6.7.0" +version: "6.8.0" schema: 1 scm: github.com/pubnub/c-sharp changelog: + - date: 2022-08-10 + version: v6.8.0 + changes: + - type: bug + text: "Fixed Destroy() method when multiple Pubnub instances were in use." - date: 2022-07-27 version: v6.7.0 changes: @@ -665,7 +670,7 @@ features: - QUERY-PARAM supported-platforms: - - version: Pubnub 'C#' 6.7.0 + version: Pubnub 'C#' 6.8.0 platforms: - Windows 10 and up - Windows Server 2008 and up @@ -675,7 +680,7 @@ supported-platforms: - .Net Framework 4.5 - .Net Framework 4.6.1+ - - version: PubnubPCL 'C#' 6.7.0 + version: PubnubPCL 'C#' 6.8.0 platforms: - Xamarin.Android - Xamarin.iOS @@ -695,7 +700,7 @@ supported-platforms: - .Net Core - .Net 6.0 - - version: PubnubUWP 'C#' 6.7.0 + version: PubnubUWP 'C#' 6.8.0 platforms: - Windows Phone 10 - Universal Windows Apps @@ -719,7 +724,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: Pubnub - location: https://github.com/pubnub/c-sharp/releases/tag/v6.7.0.0 + location: https://github.com/pubnub/c-sharp/releases/tag/v6.8.0.0 requires: - name: ".Net" @@ -1002,7 +1007,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: PubNubPCL - location: https://github.com/pubnub/c-sharp/releases/tag/v6.7.0.0 + location: https://github.com/pubnub/c-sharp/releases/tag/v6.8.0.0 requires: - name: ".Net Core" @@ -1361,7 +1366,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: PubnubUWP - location: https://github.com/pubnub/c-sharp/releases/tag/v6.7.0.0 + location: https://github.com/pubnub/c-sharp/releases/tag/v6.8.0.0 requires: - name: "Universal Windows Platform Development" diff --git a/CHANGELOG b/CHANGELOG index 4d6f6fcf5..3747e8fb3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +v6.8.0 - August 10 2022 +----------------------------- +- Fixed: fixed Destroy() method when multiple Pubnub instances were in use. + v6.7.0 - July 27 2022 ----------------------------- - Modified: added support for Users/Spaces to GrantToken. diff --git a/src/Api/PubnubApi/Properties/AssemblyInfo.cs b/src/Api/PubnubApi/Properties/AssemblyInfo.cs index 6fd67cfe4..a35e09a23 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.7.0.0")] -[assembly: AssemblyFileVersion("6.7.0.0")] +[assembly: AssemblyVersion("6.8.0.0")] +[assembly: AssemblyFileVersion("6.8.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 cf2ce9670..0a5506e93 100644 --- a/src/Api/PubnubApi/PubnubApi.csproj +++ b/src/Api/PubnubApi/PubnubApi.csproj @@ -13,7 +13,7 @@ Pubnub - 6.7.0.0 + 6.8.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/ - Added support for Users/Spaces to GrantToken. + Fixed Destroy() method when multiple Pubnub instances were in use. 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/PubnubApi/PubnubCoreBase.cs b/src/Api/PubnubApi/PubnubCoreBase.cs index de7465e0a..7ce2c9841 100644 --- a/src/Api/PubnubApi/PubnubCoreBase.cs +++ b/src/Api/PubnubApi/PubnubCoreBase.cs @@ -2273,7 +2273,10 @@ protected bool DeleteLocalChannelGroupUserState(string channelGroup) internal void EndPendingRequests() { - SubscribeCallbackListenerList.Clear(); + if (SubscribeCallbackListenerList.ContainsKey(PubnubInstance.InstanceId)) + { + SubscribeCallbackListenerList[PubnubInstance.InstanceId].Clear(); + } RemoveChannelDictionary(); TerminatePendingWebRequest(); @@ -2314,8 +2317,11 @@ internal void EndPendingRequests() ChannelGroupUserState[PubnubInstance.InstanceId].Clear(); } - RemoveHttpClients(); - + if (MultiChannelSubscribe.Count > 0 && MultiChannelSubscribe.Where(t => t.Value.Keys.Count > 0).Count() == 0 + && MultiChannelGroupSubscribe.Count > 0 && MultiChannelGroupSubscribe.Where(t => t.Value.Keys.Count > 0).Count() == 0) + { + RemoveHttpClients(); + } PubnubInstance = null; } @@ -2352,7 +2358,7 @@ internal static void RemoveHttpClients() } #endif } - + internal void TerminateCurrentSubscriberRequest() { string[] channels = GetCurrentSubscriberChannels(); diff --git a/src/Api/PubnubApiPCL/PubnubApiPCL.csproj b/src/Api/PubnubApiPCL/PubnubApiPCL.csproj index c17393579..47083a067 100644 --- a/src/Api/PubnubApiPCL/PubnubApiPCL.csproj +++ b/src/Api/PubnubApiPCL/PubnubApiPCL.csproj @@ -14,7 +14,7 @@ PubnubPCL - 6.7.0.0 + 6.8.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/ - Added support for Users/Spaces to GrantToken. + Fixed Destroy() method when multiple Pubnub instances were in use. 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 3b8460a23..dfb7075f5 100644 --- a/src/Api/PubnubApiUWP/PubnubApiUWP.csproj +++ b/src/Api/PubnubApiUWP/PubnubApiUWP.csproj @@ -15,7 +15,7 @@ PubnubUWP - 6.7.0.0 + 6.8.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/ - Added support for Users/Spaces to GrantToken. + Fixed Destroy() method when multiple Pubnub instances were in use. 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/Examples/PubnubApi.ConsoleExample/PubnubApi.ConsoleExample.csproj b/src/Examples/PubnubApi.ConsoleExample/PubnubApi.ConsoleExample.csproj index b6ff129ec..a41ae4303 100644 --- a/src/Examples/PubnubApi.ConsoleExample/PubnubApi.ConsoleExample.csproj +++ b/src/Examples/PubnubApi.ConsoleExample/PubnubApi.ConsoleExample.csproj @@ -48,8 +48,8 @@ ..\..\packages\PeterO.Numbers.1.8.2\lib\net40\Numbers.dll - - ..\..\packages\Pubnub.6.6.0\lib\net48\Pubnub.dll + + ..\..\packages\Pubnub.6.7.0\lib\net48\Pubnub.dll diff --git a/src/Examples/PubnubApi.ConsoleExample/packages.config b/src/Examples/PubnubApi.ConsoleExample/packages.config index ce9efe1e5..795c57286 100644 --- a/src/Examples/PubnubApi.ConsoleExample/packages.config +++ b/src/Examples/PubnubApi.ConsoleExample/packages.config @@ -4,7 +4,7 @@ - +