From 02ae845baba912fed687ecee1b4b4df533522022 Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Mon, 7 Oct 2013 09:07:57 +0200 Subject: [PATCH] Magic fix. --- src/xapi.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/xapi.js b/src/xapi.js index a864eda..54c08d6 100644 --- a/src/xapi.js +++ b/src/xapi.js @@ -61,7 +61,12 @@ Xapi.prototype.call = function (method) { // @todo Add a limit to avoid trying indefinitely. - return Q.delay(1000).then(helper); + // @todo Magic number!!! + // + // I would like to be able to use a shorter delay but + // for some reason, when we connect to XAPI at a give + // moment, the connection hangs. + return Q.delay(5000).then(helper); } // XAPI is sometimes reinitialized and sessions are lost.