From e59865a11d7b17d50f830f8f820224232983ae92 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Fri, 28 Oct 2016 09:41:45 -0700 Subject: [PATCH] Small tweaks - Fixed errros in JS - Style change in HubEndpoint --- samples/SocketsSample/EndPoints/HubEndpoint.cs | 4 +++- samples/SocketsSample/wwwroot/hubs.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/SocketsSample/EndPoints/HubEndpoint.cs b/samples/SocketsSample/EndPoints/HubEndpoint.cs index a8b6afeab2..5a7c6ea36c 100644 --- a/samples/SocketsSample/EndPoints/HubEndpoint.cs +++ b/samples/SocketsSample/EndPoints/HubEndpoint.cs @@ -30,7 +30,9 @@ namespace SocketsSample protected override void Initialize(object endpoint) { - ((Hub)endpoint).Clients = this; + var hub = (Hub)endpoint; + hub.Clients = this; + base.Initialize(endpoint); } diff --git a/samples/SocketsSample/wwwroot/hubs.html b/samples/SocketsSample/wwwroot/hubs.html index 9d8678525c..cfd3488473 100644 --- a/samples/SocketsSample/wwwroot/hubs.html +++ b/samples/SocketsSample/wwwroot/hubs.html @@ -37,7 +37,7 @@ } // Response - if (typeof response.id === "number") { + if (response.Id) { var cb = calls[response.Id]; delete calls[response.Id];