Project

General

Profile

Bug #7040 » 0001-Fix-Wt.js-waitingForJavaScript-sequence-issue.patch

Bruce Toll, 05/11/2019 02:24 AM

View differences:

src/web/skeleton/Wt.js
websocket.state = WebSocketWorking;
}
var handleResponseQueue = [];
function handleResponse(status, msg, timer) {
if (connectionMonitor)
connectionMonitor.onStatusChange('connectionStatus', status == 0 ? 1 : 0);
......
if (hasQuit)
return;
while (!waitingForJavaScript && handleResponseQueue.length > 0) {
(handleResponseQueue.shift())();
}
if (waitingForJavaScript) {
setTimeout(function() { handleResponse(status, msg, timer); }, 50);
handleResponseQueue.push(function() { handleResponse(status, msg, timer); });
return;
}
(2-2/3)