This commit is contained in:
Josh Harvey 2014-05-02 10:25:39 -04:00
parent 2d0938c1e5
commit d2cb7e8a07
7 changed files with 44 additions and 36 deletions

View file

@ -2,6 +2,7 @@
var _trader;
var _lamassuConfig;
var logger = require('./logger');
// Make sure these are higher than polling interval
// or there will be a lot of errors
@ -22,6 +23,8 @@ var poll = function(req, res) {
var balanceRec = _trader.balance;
var fingerprint = req.connection.getPeerCertificate().fingerprint;
logger.debug('poll request from: %s', fingerprint);
// `rateRec` and `balanceRec` are both objects, so there's no danger
// of misinterpreting rate or balance === 0 as 'Server initializing'.
if (!rateRec || !balanceRec) {