Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions .pubnub.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
54 changes: 32 additions & 22 deletions src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ private void MultiChannelSubscribeRequest<T>(PNOperationType type, string[] chan
}
Announce(status);
}

// Begin recursive subscribe
RequestState<T> pubnubRequestState = null;
try {
Expand All @@ -297,37 +296,48 @@ private void MultiChannelSubscribeRequest<T>(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<object> result = ProcessJsonResponse<T>(pubnubRequestState, json);
logger?.Trace($"result count of ProcessJsonResponse = {result?.Count ?? -1}");

ProcessResponseCallbacks<T>(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<T>(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<T>), 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<T>), pubnubRequestState,
(-1 == PubnubNetworkTcpCheckIntervalInSeconds) ? Timeout.Infinite : PubnubNetworkTcpCheckIntervalInSeconds * 1000,
Timeout.Infinite);
logger?.Debug("Request cancelled");
}
});
} catch (Exception ex) {
Expand Down
4 changes: 2 additions & 2 deletions src/Api/PubnubApi/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions src/Api/PubnubApi/PubnubApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@

<PropertyGroup>
<PackageId>Pubnub</PackageId>
<PackageVersion>7.3.1.0</PackageVersion>
<PackageVersion>7.3.2.0</PackageVersion>
<Title>PubNub C# .NET - Web Data Push API</Title>
<Authors>Pandu Masabathula</Authors>
<Owners>PubNub</Owners>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageIconUrl>http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png</PackageIconUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RepositoryUrl>https://github.com/pubnub/c-sharp/</RepositoryUrl>
<PackageReleaseNotes>Removed old deprecated logger code.</PackageReleaseNotes>
<PackageReleaseNotes>Upgrade newtonsoft json library.</PackageReleaseNotes>
<PackageTags>Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing</PackageTags>
<!--<Summary>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</Summary>-->
<Description>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</Description>
Expand Down Expand Up @@ -63,7 +63,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1">
<PackageReference Include="Newtonsoft.Json" Version="13.0.3">
<PrivateAssets>None</PrivateAssets>
</PackageReference>
<PackageReference Include="PeterO.Cbor" Version="4.5.2" />
Expand Down
Loading
Loading