Skip to content

Commit

Permalink
CP: Schedule request before handling possible request errors. Fix #101
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricioschneider committed Mar 17, 2015
1 parent 5df316d commit 77e0c61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/agent/plugins/control-panel/interval/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ var request = function() {
getter.commands(function(err, resp) {
requesting = false;

schedule_request();

if (err)
return hooks.trigger('error', err, 'interval');
else if (resp.statusCode != 200)
Expand All @@ -47,7 +49,6 @@ var request = function() {
if (cmd) emitter.emit('command', cmd);
});

schedule_request();
});
};

Expand Down

0 comments on commit 77e0c61

Please sign in to comment.