refactor: fix eslint errors

This commit is contained in:
avwo
2016-04-15 21:13:38 +08:00
parent 1fc90dd91f
commit e7747f77b1
2 changed files with 1 additions and 7 deletions
-2
View File
@@ -1,7 +1,6 @@
var net = require('net');
var tls = require('tls');
var url = require('url');
var path = require('path');
var EventEmitter = require('events').EventEmitter;
var util = require('../util');
var config = require('../config');
@@ -35,7 +34,6 @@ function handleWebsocket(socket, clientIp, callback) {
res: resData
};
var options = url.parse(fullUrl);
var proxyUrl = util.rule.getProxy(_rules.rule);
var reqSocket, options, pluginHomePage, plugin, matchedUrl, timeout, done;
plugin = pluginHomePage = pluginMgr.getPluginByHomePage(fullUrl);
+1 -5
View File
@@ -110,7 +110,7 @@ proto.destroy = function destroy() {
this._serverCount = 0;
for (var i in cache) {
var promise = cache[i];
promise.done(function(port) {
promise.done(function() {
setTimeout(function() {
try {
promise.server.close();
@@ -121,8 +121,6 @@ proto.destroy = function destroy() {
};
function getServer(options, secureConnectionListener, callback) {
var self = this;
if (curPort > MAX_PORT) {
curPort = 40000;
}
@@ -140,7 +138,5 @@ function getServer(options, secureConnectionListener, callback) {
});
}
function noop() {}
module.exports = ServerAgent;