mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 13:41:21 +00:00
Must only check response if readyState >= 2.
This commit is contained in:
@@ -223,6 +223,9 @@ Guacamole.HTTPTunnel = function(tunnelURL) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not parse response yet if not ready
|
||||||
|
if (xmlhttprequest.readyState < 2) return;
|
||||||
|
|
||||||
// Attempt to read status
|
// Attempt to read status
|
||||||
var status;
|
var status;
|
||||||
try { status = xmlhttprequest.status; }
|
try { status = xmlhttprequest.status; }
|
||||||
@@ -231,7 +234,7 @@ Guacamole.HTTPTunnel = function(tunnelURL) {
|
|||||||
catch (e) { status = 200; }
|
catch (e) { status = 200; }
|
||||||
|
|
||||||
// Start next request as soon as possible IF request was successful
|
// Start next request as soon as possible IF request was successful
|
||||||
if (xmlhttprequest.readyState >= 2 && nextRequest == null && status == 200)
|
if (nextRequest == null && status == 200)
|
||||||
nextRequest = makeRequest();
|
nextRequest = makeRequest();
|
||||||
|
|
||||||
// Parse stream when data is received and when complete.
|
// Parse stream when data is received and when complete.
|
||||||
|
Reference in New Issue
Block a user