Various minor JSHint fixes.
Summary: Various fixes as suggested by JSHint. Test Plan: Eye-balled it. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9783
This commit is contained in:
@@ -62,10 +62,9 @@ if (process.getuid() !== 0) {
|
||||
|
||||
var net = require('net');
|
||||
var http = require('http');
|
||||
var url = require('url');
|
||||
|
||||
process.on('uncaughtException', function(err) {
|
||||
debug.log("\n<<< UNCAUGHT EXCEPTION! >>>\n" + err.stack);
|
||||
debug.log('\n<<< UNCAUGHT EXCEPTION! >>>\n' + err.stack);
|
||||
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -188,7 +187,7 @@ var receive_server = http.createServer(function(request, response) {
|
||||
}
|
||||
});
|
||||
} else if (request.url == '/status/') {
|
||||
request.on('data', function(data) {
|
||||
request.on('data', function() {
|
||||
// We just ignore the request data, but newer versions of Node don't
|
||||
// get to 'end' if we don't process the data. See T2953.
|
||||
});
|
||||
@@ -213,7 +212,6 @@ var receive_server = http.createServer(function(request, response) {
|
||||
response.write('400 Bad Request');
|
||||
response.end();
|
||||
}
|
||||
|
||||
}).listen(config.admin, config.host);
|
||||
|
||||
function transmit(msg) {
|
||||
|
||||
@@ -46,7 +46,7 @@ JX.install('AphlictFlashPolicyServer', {
|
||||
this._log('<FlashPolicy> Socket Error: %s', error);
|
||||
},
|
||||
|
||||
_log: function(pattern) {
|
||||
_log: function() {
|
||||
this._debug && this._debug.log.apply(this._debug, arguments);
|
||||
},
|
||||
|
||||
@@ -60,7 +60,7 @@ JX.install('AphlictFlashPolicyServer', {
|
||||
'</cross-domain-policy>'
|
||||
];
|
||||
|
||||
return policy.join("\n") + "\0";
|
||||
return policy.join('\n') + '\0';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ JX.install('AphlictLog', {
|
||||
return this;
|
||||
},
|
||||
|
||||
log: function(pattern) {
|
||||
log: function() {
|
||||
var str = util.format.apply(null, arguments);
|
||||
var date = new Date().toLocaleString();
|
||||
str = '[' + date + '] ' + str;
|
||||
@@ -43,7 +43,7 @@ JX.install('AphlictLog', {
|
||||
}
|
||||
|
||||
for (ii = 0; ii < this._writeToLogs.length; ii++) {
|
||||
this._writeToLogs[ii].write(str + "\n");
|
||||
this._writeToLogs[ii].write(str + '\n');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user