diff --git a/libs/api.js b/libs/api.js index c8907a2..9743f74 100644 --- a/libs/api.js +++ b/libs/api.js @@ -110,7 +110,9 @@ module.exports = function(logger, portalConfig, poolConfigs){ }); res.write('\n'); var uid = Math.random().toString(); + req.on("close", function() { _this.liveStatConnections[uid] = res; + res.flush(); req.on("close", function() { delete _this.liveStatConnections[uid]; });