GUACAMOLE-201: Occasionally verify client responsiveness when intercepting streams.

This commit is contained in:
Michael Jumper
2017-02-08 19:49:01 -08:00
parent 7fd7035a47
commit 6ae9faddc2
2 changed files with 44 additions and 1 deletions

View File

@@ -215,6 +215,11 @@ angular.module('rest').factory('tunnelService', ['$injector',
document.body.removeChild(iframe);
};
// Acknowledge (and ignore) any received blobs
stream.onblob = function acknowledgeData() {
stream.sendAck('OK', Guacamole.Status.Code.SUCCESS);
};
// Automatically remove iframe from DOM a few seconds after the stream
// ends, in the browser does NOT fire the "load" event for downloads
stream.onend = function downloadComplete() {