From 613ac2d6c3409356f4f5d99b8b09b1c1522b838d Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 1 Oct 2016 15:48:15 -0700 Subject: [PATCH] Fix long polling --- samples/SocketsSample/wwwroot/polling.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/SocketsSample/wwwroot/polling.html b/samples/SocketsSample/wwwroot/polling.html index 4a6d15831d..5405dd9a49 100644 --- a/samples/SocketsSample/wwwroot/polling.html +++ b/samples/SocketsSample/wwwroot/polling.html @@ -38,7 +38,7 @@ xhr.open('POST', url, true); xhr.onreadystatechange = () => { if (xhr.readyState == 4 && xhr.status == 200) { - sock.onmessage(xhr.responseText); + sock.onmessage({ data: xhr.responseText }); poll(xhr); } } @@ -69,7 +69,7 @@ sock.onopen(); - poll(connectionId, new XMLHttpRequest()); + poll(new XMLHttpRequest()); }); }