fixes error with callback
This commit is contained in:
parent
2aed4257df
commit
cb49f4d08e
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "tor-router",
|
"name": "tor-router",
|
||||||
"version": "3.0.4",
|
"version": "3.0.5",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"repository": "git@github.com:znetstar/tor-router.git",
|
"repository": "git@github.com:znetstar/tor-router.git",
|
||||||
"author": "Zachary Boyd <zachary@zacharyboyd.nyc>",
|
"author": "Zachary Boyd <zachary@zacharyboyd.nyc>",
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
"tor-router": "bin/tor-router"
|
"tor-router": "bin/tor-router"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "bin/tor-router -l debug -s -d -j 3",
|
"start": "bin/tor-router -l debug -s -d -j 1",
|
||||||
"test": "mocha test/test.js"
|
"test": "mocha test/test.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -23,7 +23,7 @@ class ControlServer {
|
||||||
socket.on('createDNSServer', this.createDNSServer.bind(this));
|
socket.on('createDNSServer', this.createDNSServer.bind(this));
|
||||||
|
|
||||||
socket.on('createInstances', (instances, callback) => { this.torPool.create(instances, (error, instances) => {
|
socket.on('createInstances', (instances, callback) => { this.torPool.create(instances, (error, instances) => {
|
||||||
callback(error)
|
callback && callback(error)
|
||||||
}); });
|
}); });
|
||||||
socket.on('removeInstances', (instances, callback) => { this.torPool.remove(instances, callback); });
|
socket.on('removeInstances', (instances, callback) => { this.torPool.remove(instances, callback); });
|
||||||
socket.on('newIps', () => { this.torPool.new_ips(); });
|
socket.on('newIps', () => { this.torPool.new_ips(); });
|
||||||
|
|
Loading…
Reference in a new issue