Skip to content

Commit 3094f66

Browse files
mohitpubnubMohit Tejanipubnub-release-bot
authored
refactor: enhance explicit timetoken subscribe request handling (#248)
* refactor: log statements in HttpClientService. condition update to make tt=0 calls when explicitly mentioned. * PubNub SDK v7.3.8.0 release. --------- Co-authored-by: Mohit Tejani <[email protected]> Co-authored-by: PubNub Release Bot <[email protected]>
1 parent a91a224 commit 3094f66

File tree

10 files changed

+30
-20
lines changed

10 files changed

+30
-20
lines changed

.pubnub.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
name: c-sharp
2-
version: "7.3.7"
2+
version: "7.3.8"
33
schema: 1
44
scm: github.com/pubnub/c-sharp
55
changelog:
6+
- date: 2025-04-08
7+
version: v7.3.8
8+
changes:
9+
- type: improvement
10+
text: "Subscribe with custom timetoken scenario handling improvements."
611
- date: 2025-04-07
712
version: v7.3.7
813
changes:
@@ -882,7 +887,7 @@ features:
882887
- QUERY-PARAM
883888
supported-platforms:
884889
-
885-
version: Pubnub 'C#' 7.3.7
890+
version: Pubnub 'C#' 7.3.8
886891
platforms:
887892
- Windows 10 and up
888893
- Windows Server 2008 and up
@@ -893,7 +898,7 @@ supported-platforms:
893898
- .Net Framework 4.6.1+
894899
- .Net Framework 6.0
895900
-
896-
version: PubnubPCL 'C#' 7.3.7
901+
version: PubnubPCL 'C#' 7.3.8
897902
platforms:
898903
- Xamarin.Android
899904
- Xamarin.iOS
@@ -913,7 +918,7 @@ supported-platforms:
913918
- .Net Core
914919
- .Net 6.0
915920
-
916-
version: PubnubUWP 'C#' 7.3.7
921+
version: PubnubUWP 'C#' 7.3.8
917922
platforms:
918923
- Windows Phone 10
919924
- Universal Windows Apps
@@ -937,7 +942,7 @@ sdks:
937942
distribution-type: source
938943
distribution-repository: GitHub
939944
package-name: Pubnub
940-
location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.7.0
945+
location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.8.0
941946
requires:
942947
-
943948
name: ".Net"
@@ -1220,7 +1225,7 @@ sdks:
12201225
distribution-type: source
12211226
distribution-repository: GitHub
12221227
package-name: PubNubPCL
1223-
location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.7.0
1228+
location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.8.0
12241229
requires:
12251230
-
12261231
name: ".Net Core"
@@ -1579,7 +1584,7 @@ sdks:
15791584
distribution-type: source
15801585
distribution-repository: GitHub
15811586
package-name: PubnubUWP
1582-
location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.7.0
1587+
location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.8.0
15831588
requires:
15841589
-
15851590
name: "Universal Windows Platform Development"

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
v7.3.8 - April 08 2025
2+
-----------------------------
3+
- Modified: subscribe with custom timetoken scenario handling improvements.
4+
15
v7.3.7 - April 07 2025
26
-----------------------------
37
- Modified: enhance request handling with detailed response interface.

src/Api/PubnubApi/EndPoint/PubSub/SubscribeEndpoint.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public void Execute()
107107
string[] channelNames = subscribeChannelNames != null ? this.subscribeChannelNames.ToArray() : null;
108108
string[] channelGroupNames = subscribeChannelGroupNames != null ? this.subscribeChannelGroupNames.ToArray() : null;
109109
SubscriptionCursor cursor = null;
110-
if (subscribeTimetoken >= 1) {
110+
if (subscribeTimetoken >= 0) {
111111
cursor = new SubscriptionCursor { Timetoken = subscribeTimetoken, Region = 0 };
112112
}
113113
Subscribe(channelNames, channelGroupNames, cursor, this.queryParam);

src/Api/PubnubApi/EventEngine/Subscribe/States/ReceivingState.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public override TransitionResult Transition(IEvent e)
4242
Channels = subscriptionRestored.Channels,
4343
ChannelGroups = subscriptionRestored.ChannelGroups,
4444
Cursor = subscriptionRestored.Cursor,
45-
},
45+
}.With(
46+
new EmitStatusInvocation(new PNStatus(null,PNOperationType.PNSubscribeOperation, PNStatusCategory.PNSubscriptionChangedCategory, subscriptionRestored.Channels?? new string[]{}, subscriptionRestored.ChannelGroups?? new string[]{}, Constants.HttpRequestSuccessStatusCode))),
4647

4748
Events.DisconnectEvent disconnect => new ReceiveStoppedState()
4849
{

src/Api/PubnubApi/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
[assembly: AssemblyProduct("Pubnub C# SDK")]
1212
[assembly: AssemblyCopyright("Copyright © 2021")]
1313
[assembly: AssemblyTrademark("")]
14-
[assembly: AssemblyVersion("7.3.7.0")]
15-
[assembly: AssemblyFileVersion("7.3.7.0")]
14+
[assembly: AssemblyVersion("7.3.8.0")]
15+
[assembly: AssemblyFileVersion("7.3.8.0")]
1616
// Setting ComVisible to false makes the types in this assembly not visible
1717
// to COM components. If you need to access a type in this assembly from
1818
// COM, set the ComVisible attribute to true on that type.

src/Api/PubnubApi/PubnubApi.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414

1515
<PropertyGroup>
1616
<PackageId>Pubnub</PackageId>
17-
<PackageVersion>7.3.7.0</PackageVersion>
17+
<PackageVersion>7.3.8.0</PackageVersion>
1818
<Title>PubNub C# .NET - Web Data Push API</Title>
1919
<Authors>Pandu Masabathula</Authors>
2020
<Owners>PubNub</Owners>
2121
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
2222
<PackageIconUrl>http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png</PackageIconUrl>
2323
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
2424
<RepositoryUrl>https://github.com/pubnub/c-sharp/</RepositoryUrl>
25-
<PackageReleaseNotes>Enhance request handling with detailed response interface.</PackageReleaseNotes>
25+
<PackageReleaseNotes>Subscribe with custom timetoken scenario handling improvements.</PackageReleaseNotes>
2626
<PackageTags>Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing</PackageTags>
2727
<!--<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>-->
2828
<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>

src/Api/PubnubApi/Transport/HttpClientService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,12 @@ private TransportResponse GetTransportResponseForTaskCancelation(TransportReques
398398
if (ctsWithTimeout is { Token.IsCancellationRequested: true } &&
399399
!transportRequest.CancellationTokenSource.IsCancellationRequested)
400400
{
401-
logger?.Debug("\n\n\n\n TASK TIMEOUT NETWORK ERROR \n\n\n\n\n");
401+
logger?.Debug("HttpClient Service: Task canceled due to timeout");
402402
transportResponse.IsTimeOut = true;
403403
}
404404
else
405405
{
406-
logger?.Debug("\n\n\n\n TASK CANCELLED \n\n\n\n\n");
406+
logger?.Debug("HttpClient Service: Task canceled due to cancellation request");
407407
transportResponse.IsCancelled = true;
408408
}
409409
return transportResponse;

src/Api/PubnubApiPCL/PubnubApiPCL.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414

1515
<PropertyGroup>
1616
<PackageId>PubnubPCL</PackageId>
17-
<PackageVersion>7.3.7.0</PackageVersion>
17+
<PackageVersion>7.3.8.0</PackageVersion>
1818
<Title>PubNub C# .NET - Web Data Push API</Title>
1919
<Authors>Pandu Masabathula</Authors>
2020
<Owners>PubNub</Owners>
2121
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
2222
<PackageIconUrl>http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png</PackageIconUrl>
2323
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
2424
<RepositoryUrl>https://github.com/pubnub/c-sharp/</RepositoryUrl>
25-
<PackageReleaseNotes>Enhance request handling with detailed response interface.</PackageReleaseNotes>
25+
<PackageReleaseNotes>Subscribe with custom timetoken scenario handling improvements.</PackageReleaseNotes>
2626
<PackageTags>Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing</PackageTags>
2727
<!--<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>-->
2828
<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>

src/Api/PubnubApiUWP/PubnubApiUWP.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616

1717
<PropertyGroup>
1818
<PackageId>PubnubUWP</PackageId>
19-
<PackageVersion>7.3.7.0</PackageVersion>
19+
<PackageVersion>7.3.8.0</PackageVersion>
2020
<Title>PubNub C# .NET - Web Data Push API</Title>
2121
<Authors>Pandu Masabathula</Authors>
2222
<Owners>PubNub</Owners>
2323
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
2424
<PackageIconUrl>http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png</PackageIconUrl>
2525
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
2626
<RepositoryUrl>https://github.com/pubnub/c-sharp/</RepositoryUrl>
27-
<PackageReleaseNotes>Enhance request handling with detailed response interface.</PackageReleaseNotes>
27+
<PackageReleaseNotes>Subscribe with custom timetoken scenario handling improvements.</PackageReleaseNotes>
2828
<PackageTags>Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing</PackageTags>
2929
<!--<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>-->
3030
<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>

src/Api/PubnubApiUnity/PubnubApiUnity.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<PropertyGroup>
1616
<PackageId>PubnubApiUnity</PackageId>
17-
<PackageVersion>7.3.7.0</PackageVersion>
17+
<PackageVersion>7.3.8.0</PackageVersion>
1818
<Title>PubNub C# .NET - Web Data Push API</Title>
1919
<Authors>Pandu Masabathula</Authors>
2020
<Owners>PubNub</Owners>

0 commit comments

Comments
 (0)