diff --git a/.pubnub.yml b/.pubnub.yml index f82c7b1c2..d6ff93c79 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -1,8 +1,13 @@ name: c-sharp -version: "8.0.2" +version: "8.0.3" schema: 1 scm: github.com/pubnub/c-sharp changelog: + - date: 2025-11-20 + version: v8.0.3 + changes: + - type: improvement + text: "Refactor EmitStatus to prevent concurrent modification issue resulting InvalidOperationException." - date: 2025-11-17 version: v8.0.2 changes: @@ -962,7 +967,7 @@ features: - QUERY-PARAM supported-platforms: - - version: Pubnub 'C#' 8.0.2 + version: Pubnub 'C#' 8.0.3 platforms: - Windows 10 and up - Windows Server 2008 and up @@ -973,7 +978,7 @@ supported-platforms: - .Net Framework 4.6.1+ - .Net Framework 6.0 - - version: PubnubPCL 'C#' 8.0.2 + version: PubnubPCL 'C#' 8.0.3 platforms: - Xamarin.Android - Xamarin.iOS @@ -993,7 +998,7 @@ supported-platforms: - .Net Core - .Net 6.0 - - version: PubnubUWP 'C#' 8.0.2 + version: PubnubUWP 'C#' 8.0.3 platforms: - Windows Phone 10 - Universal Windows Apps @@ -1017,7 +1022,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: Pubnub - location: https://github.com/pubnub/c-sharp/releases/tag/v8.0.2 + location: https://github.com/pubnub/c-sharp/releases/tag/v8.0.3 requires: - name: ".Net" @@ -1300,7 +1305,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: PubNubPCL - location: https://github.com/pubnub/c-sharp/releases/tag/v8.0.2 + location: https://github.com/pubnub/c-sharp/releases/tag/v8.0.3 requires: - name: ".Net Core" @@ -1659,7 +1664,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: PubnubUWP - location: https://github.com/pubnub/c-sharp/releases/tag/v8.0.2 + location: https://github.com/pubnub/c-sharp/releases/tag/v8.0.3 requires: - name: "Universal Windows Platform Development" diff --git a/CHANGELOG b/CHANGELOG index db2db2fc1..5ddb4ab12 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +v8.0.3 - November 20 2025 +----------------------------- +- Modified: refactor EmitStatus to prevent concurrent modification issue resulting InvalidOperationException. + v8.0.2 - November 17 2025 ----------------------------- - Fixed: fixes issue of subscription loop breaking when a listener callback throws exception. diff --git a/src/Api/PubnubApi/EndPoint/PubSub/SubscribeEndpoint.cs b/src/Api/PubnubApi/EndPoint/PubSub/SubscribeEndpoint.cs index 8acf98ff4..4bb4551d6 100644 --- a/src/Api/PubnubApi/EndPoint/PubSub/SubscribeEndpoint.cs +++ b/src/Api/PubnubApi/EndPoint/PubSub/SubscribeEndpoint.cs @@ -229,18 +229,24 @@ private void MessageEmitter(Pubnub pubnubInstance, PNMessageResult message private void StatusEmitter(Pubnub pubnubInstance, PNStatus status) { - foreach (var listener in SubscribeListenerList) + try { - try - { - listener?.Status(pubnubInstance, status); - } - catch (Exception ex) + foreach (var listener in SubscribeListenerList.ToArray()) { - config.Logger?.Error($"error during event handler function, {ex.Message}"); + try + { + listener?.Status(pubnubInstance, status); + } + catch (Exception ex) + { + config.Logger?.Warn($"error in status event handler function, {ex.Message}"); + } } } + catch (Exception ex) + { + config.Logger?.Warn($"Emit Status encounter error: {ex.Message}"); + } } - } } diff --git a/src/Api/PubnubApi/Properties/AssemblyInfo.cs b/src/Api/PubnubApi/Properties/AssemblyInfo.cs index 85b16c895..5490c3f94 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("8.0.2")] -[assembly: AssemblyFileVersion("8.0.2")] +[assembly: AssemblyVersion("8.0.3")] +[assembly: AssemblyFileVersion("8.0.3")] // 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 46457d65e..f1de1ef01 100644 --- a/src/Api/PubnubApi/PubnubApi.csproj +++ b/src/Api/PubnubApi/PubnubApi.csproj @@ -14,7 +14,7 @@ Pubnub - 8.0.2 + 8.0.3 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 subscription loop breaking when a listener callback throws exception. + Refactor EmitStatus to prevent concurrent modification issue resulting InvalidOperationException. 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 e9a0e32f5..915f20a52 100644 --- a/src/Api/PubnubApiPCL/PubnubApiPCL.csproj +++ b/src/Api/PubnubApiPCL/PubnubApiPCL.csproj @@ -14,7 +14,7 @@ PubnubPCL - 8.0.2 + 8.0.3 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 subscription loop breaking when a listener callback throws exception. + Refactor EmitStatus to prevent concurrent modification issue resulting InvalidOperationException. 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 064959f7f..0a27a4bc5 100644 --- a/src/Api/PubnubApiUWP/PubnubApiUWP.csproj +++ b/src/Api/PubnubApiUWP/PubnubApiUWP.csproj @@ -16,7 +16,7 @@ PubnubUWP - 8.0.2 + 8.0.3 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 subscription loop breaking when a listener callback throws exception. + Refactor EmitStatus to prevent concurrent modification issue resulting InvalidOperationException. 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 0391bfa38..f612c8298 100644 --- a/src/Api/PubnubApiUnity/PubnubApiUnity.csproj +++ b/src/Api/PubnubApiUnity/PubnubApiUnity.csproj @@ -15,7 +15,7 @@ PubnubApiUnity - 8.0.2 + 8.0.3 PubNub C# .NET - Web Data Push API Pandu Masabathula PubNub