Skip to content

Commit e6270b2

Browse files
Suppress web request aborted exception message to callback (#140)
Suppress aborted exception message to callback
1 parent 4b1a8c3 commit e6270b2

File tree

7 files changed

+30
-17
lines changed

7 files changed

+30
-17
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: "6.4.0"
2+
version: "6.5.0"
33
schema: 1
44
scm: github.com/pubnub/c-sharp
55
changelog:
6+
- date: 2022-06-14
7+
version: v6.5.0
8+
changes:
9+
- type: bug
10+
text: "Suppress web request aborted exception message to callback."
611
- date: 2022-05-23
712
version: v6.4.0
813
changes:
@@ -648,7 +653,7 @@ features:
648653
- QUERY-PARAM
649654
supported-platforms:
650655
-
651-
version: Pubnub 'C#' 6.4.0
656+
version: Pubnub 'C#' 6.5.0
652657
platforms:
653658
- Windows 10 and up
654659
- Windows Server 2008 and up
@@ -658,7 +663,7 @@ supported-platforms:
658663
- .Net Framework 4.5
659664
- .Net Framework 4.6.1+
660665
-
661-
version: PubnubPCL 'C#' 6.4.0
666+
version: PubnubPCL 'C#' 6.5.0
662667
platforms:
663668
- Xamarin.Android
664669
- Xamarin.iOS
@@ -677,7 +682,7 @@ supported-platforms:
677682
- .Net Standard 2.1
678683
- .Net Core
679684
-
680-
version: PubnubUWP 'C#' 6.4.0
685+
version: PubnubUWP 'C#' 6.5.0
681686
platforms:
682687
- Windows Phone 10
683688
- Universal Windows Apps
@@ -701,7 +706,7 @@ sdks:
701706
distribution-type: source
702707
distribution-repository: GitHub
703708
package-name: Pubnub
704-
location: https://github.com/pubnub/c-sharp/releases/tag/v6.4.0.0
709+
location: https://github.com/pubnub/c-sharp/releases/tag/v6.5.0.0
705710
requires:
706711
-
707712
name: ".Net"
@@ -998,7 +1003,7 @@ sdks:
9981003
distribution-type: source
9991004
distribution-repository: GitHub
10001005
package-name: PubNubPCL
1001-
location: https://github.com/pubnub/c-sharp/releases/tag/v6.4.0.0
1006+
location: https://github.com/pubnub/c-sharp/releases/tag/v6.5.0.0
10021007
requires:
10031008
-
10041009
name: ".Net Core"
@@ -1371,7 +1376,7 @@ sdks:
13711376
distribution-type: source
13721377
distribution-repository: GitHub
13731378
package-name: PubnubUWP
1374-
location: https://github.com/pubnub/c-sharp/releases/tag/v6.4.0.0
1379+
location: https://github.com/pubnub/c-sharp/releases/tag/v6.5.0.0
13751380
requires:
13761381
-
13771382
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+
v6.5.0 - June 14 2022
2+
-----------------------------
3+
- Fixed: suppress web request aborted exception message to callback.
4+
15
v6.4.0 - May 23 2022
26
-----------------------------
37
- Fixed: handle PNConfiguration for multi Pubnub instances.

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("6.4.0.0")]
15-
[assembly: AssemblyFileVersion("6.4.0.0")]
14+
[assembly: AssemblyVersion("6.5.0.0")]
15+
[assembly: AssemblyFileVersion("6.5.0.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
@@ -13,15 +13,15 @@
1313

1414
<PropertyGroup>
1515
<PackageId>Pubnub</PackageId>
16-
<PackageVersion>6.4.0.0</PackageVersion>
16+
<PackageVersion>6.5.0.0</PackageVersion>
1717
<Title>PubNub C# .NET - Web Data Push API</Title>
1818
<Authors>Pandu Masabathula</Authors>
1919
<Owners>PubNub</Owners>
2020
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
2121
<PackageIconUrl>http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png</PackageIconUrl>
2222
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
2323
<RepositoryUrl>https://github.com/pubnub/c-sharp/</RepositoryUrl>
24-
<PackageReleaseNotes>Handle PNConfiguration for multi Pubnub instances.</PackageReleaseNotes>
24+
<PackageReleaseNotes>Suppress web request aborted exception message to callback.</PackageReleaseNotes>
2525
<PackageTags>Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing</PackageTags>
2626
<!--<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>-->
2727
<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/PubnubCoreBase.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,6 +1160,7 @@ internal protected async Task<Tuple<string, PNStatus>> UrlProcessRequest<T>(Uri
11601160
}
11611161
catch (Exception ex)
11621162
{
1163+
string errorMessage = ex.Message;
11631164
string exceptionMessage = "";
11641165
Exception innerEx = null;
11651166
WebException webEx = null;
@@ -1187,7 +1188,8 @@ internal protected async Task<Tuple<string, PNStatus>> UrlProcessRequest<T>(Uri
11871188
if (exceptionMessage.IndexOf("The request was aborted: The request was canceled", StringComparison.CurrentCultureIgnoreCase) == -1
11881189
&& exceptionMessage.IndexOf("Machine suspend mode enabled. No request will be processed.", StringComparison.CurrentCultureIgnoreCase) == -1
11891190
&& (pubnubRequestState.ResponseType == PNOperationType.PNSubscribeOperation && exceptionMessage.IndexOf("The operation has timed out", StringComparison.CurrentCultureIgnoreCase) == -1)
1190-
&& exceptionMessage.IndexOf("A task was canceled", StringComparison.CurrentCultureIgnoreCase) == -1)
1191+
&& exceptionMessage.IndexOf("A task was canceled", StringComparison.CurrentCultureIgnoreCase) == -1
1192+
&& errorMessage.IndexOf("The operation was canceled", StringComparison.CurrentCultureIgnoreCase) == -1)
11911193
{
11921194
PNStatusCategory category = PNStatusCategoryHelper.GetPNStatusCategory(webEx == null ? innerEx : webEx);
11931195
if (PubnubInstance != null && pubnubConfig.TryGetValue(PubnubInstance.InstanceId, out currentConfig))
@@ -1302,6 +1304,7 @@ internal protected async Task<Tuple<byte[], PNStatus>> UrlProcessRequestForStrea
13021304
}
13031305
catch (Exception ex)
13041306
{
1307+
string errorMessage = ex.Message;
13051308
string exceptionMessage = "";
13061309
Exception innerEx = null;
13071310
WebException webEx = null;
@@ -1329,7 +1332,8 @@ internal protected async Task<Tuple<byte[], PNStatus>> UrlProcessRequestForStrea
13291332
if (exceptionMessage.IndexOf("The request was aborted: The request was canceled", StringComparison.CurrentCultureIgnoreCase) == -1
13301333
&& exceptionMessage.IndexOf("Machine suspend mode enabled. No request will be processed.", StringComparison.CurrentCultureIgnoreCase) == -1
13311334
&& (pubnubRequestState.ResponseType == PNOperationType.PNSubscribeOperation && exceptionMessage.IndexOf("The operation has timed out", StringComparison.CurrentCultureIgnoreCase) == -1)
1332-
&& exceptionMessage.IndexOf("A task was canceled", StringComparison.CurrentCultureIgnoreCase) == -1)
1335+
&& exceptionMessage.IndexOf("A task was canceled", StringComparison.CurrentCultureIgnoreCase) == -1
1336+
&& errorMessage.IndexOf("The operation was canceled", StringComparison.CurrentCultureIgnoreCase) == -1)
13331337
{
13341338
PNStatusCategory category = PNStatusCategoryHelper.GetPNStatusCategory(webEx == null ? innerEx : webEx);
13351339
if (PubnubInstance != null && pubnubConfig.TryGetValue(PubnubInstance.InstanceId, out currentConfig))

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>6.4.0.0</PackageVersion>
17+
<PackageVersion>6.5.0.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>Handle PNConfiguration for multi Pubnub instances.</PackageReleaseNotes>
25+
<PackageReleaseNotes>Suppress web request aborted exception message to callback.</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
@@ -15,15 +15,15 @@
1515

1616
<PropertyGroup>
1717
<PackageId>PubnubUWP</PackageId>
18-
<PackageVersion>6.4.0.0</PackageVersion>
18+
<PackageVersion>6.5.0.0</PackageVersion>
1919
<Title>PubNub C# .NET - Web Data Push API</Title>
2020
<Authors>Pandu Masabathula</Authors>
2121
<Owners>PubNub</Owners>
2222
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
2323
<PackageIconUrl>http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png</PackageIconUrl>
2424
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
2525
<RepositoryUrl>https://github.com/pubnub/c-sharp/</RepositoryUrl>
26-
<PackageReleaseNotes>Handle PNConfiguration for multi Pubnub instances.</PackageReleaseNotes>
26+
<PackageReleaseNotes>Suppress web request aborted exception message to callback.</PackageReleaseNotes>
2727
<PackageTags>Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing</PackageTags>
2828
<!--<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>-->
2929
<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>

0 commit comments

Comments
 (0)