From 38fb5ffe05ffdd3d31d895e13655d5783bc054f8 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Mon, 11 Aug 2014 18:34:34 +0200 Subject: [PATCH] Fixed extension timeout triggering unconditionally. There was an issue with the timeout that waited for the extension to become available on auto-install, which always triggered after 30 seconds (and showed a message), even if the extension already initialized. --- static/js/services/screensharing.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/static/js/services/screensharing.js b/static/js/services/screensharing.js index 0c8cdcdb..0da8a8b7 100644 --- a/static/js/services/screensharing.js +++ b/static/js/services/screensharing.js @@ -162,10 +162,12 @@ define(['underscore', 'webrtc.adapter'], function(_) { }); } }, 100); - // Add a timeout of 30 seconds. + // The installation has been installed, but initialization might not work $timeout(function() { - waiting = false; - d.reject("Timeout while waiting for extension getting installed"); + if (waiting) { + waiting = false; + d.reject("Timeout while waiting for extension to become available"); + } }, 30000); }, function(err) { console.log("Auto install of extension failed.", err); @@ -220,4 +222,4 @@ define(['underscore', 'webrtc.adapter'], function(_) { }]; -}); \ No newline at end of file +});