You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ea...@apache.org on 2016/11/14 21:55:51 UTC

qpid-dispatch git commit: DISPATCH-543 Prevent timeout when initially loading management info

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master c42f2c452 -> 5505f3e42


DISPATCH-543 Prevent timeout when initially loading management info


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/5505f3e4
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/5505f3e4
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/5505f3e4

Branch: refs/heads/master
Commit: 5505f3e421ee395e76f9cf84dca3326679b28d51
Parents: c42f2c4
Author: Ernest Allen <ea...@redhat.com>
Authored: Mon Nov 14 16:55:31 2016 -0500
Committer: Ernest Allen <ea...@redhat.com>
Committed: Mon Nov 14 16:55:31 2016 -0500

----------------------------------------------------------------------
 console/stand-alone/plugin/js/qdrService.js | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/5505f3e4/console/stand-alone/plugin/js/qdrService.js
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/js/qdrService.js b/console/stand-alone/plugin/js/qdrService.js
index 4581724..f8e8aec 100644
--- a/console/stand-alone/plugin/js/qdrService.js
+++ b/console/stand-alone/plugin/js/qdrService.js
@@ -768,16 +768,19 @@ QDR.log.debug("topology get called")
 
       getNodeInfo: function(nodeName, entity, attrs, q, callback) {
         //QDR.log.debug("getNodeInfo called with nodeName: " + nodeName + " and entity " + entity);
+        if (!callback) {
+          callback = q
+          q = undefined
+        }
         clearTimeout(self.topology._waitTimer)
-        self.topology._waitTimer = setTimeout(self.topology.timedOut, self.timeout * 1000, q);
-        setTimeout(function () {
-          var ret;
-          self.correlator.request(
-            ret = self.sendQuery(nodeName, entity, attrs)
-          ).then(ret.id, function(response) {
-            callback(nodeName, entity, response);
-          }, ret.error);
-        }, 1)
+        if (q)
+          self.topology._waitTimer = setTimeout(self.topology.timedOut, self.timeout * 1000, q);
+        var ret;
+        self.correlator.request(
+          ret = self.sendQuery(nodeName, entity, attrs)
+        ).then(ret.id, function(response) {
+          callback(nodeName, entity, response);
+        }, ret.error);
       },
 
       sendMethod: function(nodeId, entity, attrs, operation, props, callback) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org