diff --git a/lib/http-worker.js b/lib/http-worker.js index bec5d718f..5e86dae49 100644 --- a/lib/http-worker.js +++ b/lib/http-worker.js @@ -11,12 +11,7 @@ const DEFAULT_QUERY_TIMEOUT = 5000; const PID = process.pid; const response = Util.response(function (errLabel, info) { - // XXX handle error - console.error({ - _: '// XXX', - errLabel: errLabel, - info: info, - }); + Env.Log.error(errLabel, info); }); const guid = () => { @@ -64,7 +59,7 @@ EVENTS.ENV_UPDATE = function (data /*, cb */) { } }; -EVENTS.FLUSH_CACHE = function (data /*, cb */) { // XXX +EVENTS.FLUSH_CACHE = function (data) { if (typeof(data) !== 'number') { return Log.error('INVALID_FRESH_KEY', data); } @@ -443,12 +438,13 @@ nThen(function (w) { server.listen(3001, w()); // if (Env.httpSafePort) {... } server.on('upgrade', function (req, socket, head) { - //console.log("This should only happen in a dev environment"); // XXX + // TODO warn admins that websockets should only be proxied in this way in a dev environment + // in production it's more efficient to have your reverse proxy (NGINX) directly forward + // websocket traffic to the correct port (Env.websocketPort) wsProxy.upgrade(req, socket, head); }); }).nThen(function () { - // XXX inform the parent process that this worker is ready - + // TODO inform the parent process that this worker is ready });