@aspnet/signalr
Advanced tools
Comparing version 1.1.0-preview1-35029 to 1.1.0-preview2-35157
@@ -158,2 +158,5 @@ "use strict"; | ||
} | ||
if (negotiateResponse.ProtocolVersion) { | ||
throw Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details."); | ||
} | ||
if (negotiateResponse.url) { | ||
@@ -160,0 +163,0 @@ url = negotiateResponse.url; |
@@ -382,11 +382,21 @@ "use strict"; | ||
this.pingServerHandle = setTimeout(function () { return __awaiter(_this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
var _a; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
if (!(this.connectionState === HubConnectionState.Connected)) return [3 /*break*/, 2]; | ||
if (!(this.connectionState === HubConnectionState.Connected)) return [3 /*break*/, 4]; | ||
_b.label = 1; | ||
case 1: | ||
_b.trys.push([1, 3, , 4]); | ||
return [4 /*yield*/, this.sendMessage(this.cachedPingMessage)]; | ||
case 1: | ||
_a.sent(); | ||
_a.label = 2; | ||
case 2: return [2 /*return*/]; | ||
case 2: | ||
_b.sent(); | ||
return [3 /*break*/, 4]; | ||
case 3: | ||
_a = _b.sent(); | ||
// We don't care about the error. It should be seen elsewhere in the client. | ||
// The connection is probably in a bad or closed state now, cleanup the timer so it stops triggering | ||
this.cleanupPingTimer(); | ||
return [3 /*break*/, 4]; | ||
case 4: return [2 /*return*/]; | ||
} | ||
@@ -393,0 +403,0 @@ }); |
@@ -7,3 +7,3 @@ "use strict"; | ||
/** The version of the SignalR client. */ | ||
exports.VERSION = "1.1.0-preview1-35029"; | ||
exports.VERSION = "1.1.0-preview2-35157"; | ||
var Errors_1 = require("./Errors"); | ||
@@ -10,0 +10,0 @@ exports.AbortError = Errors_1.AbortError; |
@@ -156,2 +156,5 @@ // Copyright (c) .NET Foundation. All rights reserved. | ||
} | ||
if (negotiateResponse.ProtocolVersion) { | ||
throw Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details."); | ||
} | ||
if (negotiateResponse.url) { | ||
@@ -158,0 +161,0 @@ url = negotiateResponse.url; |
@@ -380,11 +380,21 @@ // Copyright (c) .NET Foundation. All rights reserved. | ||
this.pingServerHandle = setTimeout(function () { return __awaiter(_this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
var _a; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
if (!(this.connectionState === HubConnectionState.Connected)) return [3 /*break*/, 2]; | ||
if (!(this.connectionState === HubConnectionState.Connected)) return [3 /*break*/, 4]; | ||
_b.label = 1; | ||
case 1: | ||
_b.trys.push([1, 3, , 4]); | ||
return [4 /*yield*/, this.sendMessage(this.cachedPingMessage)]; | ||
case 1: | ||
_a.sent(); | ||
_a.label = 2; | ||
case 2: return [2 /*return*/]; | ||
case 2: | ||
_b.sent(); | ||
return [3 /*break*/, 4]; | ||
case 3: | ||
_a = _b.sent(); | ||
// We don't care about the error. It should be seen elsewhere in the client. | ||
// The connection is probably in a bad or closed state now, cleanup the timer so it stops triggering | ||
this.cleanupPingTimer(); | ||
return [3 /*break*/, 4]; | ||
case 4: return [2 /*return*/]; | ||
} | ||
@@ -391,0 +401,0 @@ }); |
@@ -5,3 +5,3 @@ // Copyright (c) .NET Foundation. All rights reserved. | ||
/** The version of the SignalR client. */ | ||
export var VERSION = "1.1.0-preview1-35029"; | ||
export var VERSION = "1.1.0-preview2-35157"; | ||
export { AbortError, HttpError, TimeoutError } from "./Errors"; | ||
@@ -8,0 +8,0 @@ export { DefaultHttpClient, HttpClient, HttpResponse } from "./HttpClient"; |
{ | ||
"name": "@aspnet/signalr", | ||
"version": "1.1.0-preview1-35029", | ||
"version": "1.1.0-preview2-35157", | ||
"description": "ASP.NET Core SignalR Client", | ||
@@ -5,0 +5,0 @@ "main": "./dist/cjs/index.js", |
@@ -149,2 +149,6 @@ // Copyright (c) .NET Foundation. All rights reserved. | ||
if ((negotiateResponse as any).ProtocolVersion) { | ||
throw Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details."); | ||
} | ||
if (negotiateResponse.url) { | ||
@@ -151,0 +155,0 @@ url = negotiateResponse.url; |
@@ -411,3 +411,9 @@ // Copyright (c) .NET Foundation. All rights reserved. | ||
if (this.connectionState === HubConnectionState.Connected) { | ||
await this.sendMessage(this.cachedPingMessage); | ||
try { | ||
await this.sendMessage(this.cachedPingMessage); | ||
} catch { | ||
// We don't care about the error. It should be seen elsewhere in the client. | ||
// The connection is probably in a bad or closed state now, cleanup the timer so it stops triggering | ||
this.cleanupPingTimer(); | ||
} | ||
} | ||
@@ -414,0 +420,0 @@ }, this.keepAliveIntervalInMilliseconds); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1272735
11688