Commit b0fe0c71 authored by Kulya's avatar Kulya 😊

Update with sock index.js

parent b38ea9b9
Pipeline #152 canceled with stages
...@@ -42,10 +42,17 @@ class AgiServer extends EventEmitter { ...@@ -42,10 +42,17 @@ class AgiServer extends EventEmitter {
this.emit('error', new Error('Internal TCP server error')); this.emit('error', new Error('Internal TCP server error'));
}); });
this.server.on('close', () => this.emit('close')); this.server.on('close', () => this.emit('close'));
this.server.listen(this.options.port, this.options.host, () => { if(this.options.host){
console.log('agi server on', this.options.port, 'listen'); this.server.listen(this.options.port, this.options.host, () => {
}); console.log('agi server on', this.options.port, 'listen');
});
}
else{
this.server.listen(this.options.port, () => {
console.log('agi server on', this.options.port, 'listen');
});
}
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment