forked from engineering/cloudservices
logging
parent
406ba69637
commit
39d8760f5f
|
@ -30,7 +30,11 @@ export default class Context {
|
|||
|
||||
public send(v: string) {
|
||||
console.log(this.socket);
|
||||
this.socket.write(`${v.toString()}\n`, (err) => err || this.client.signale.error(`Error occurred while writing: ${err}`));
|
||||
this.socket.write(`${v.toString()}\n`, (err) => {
|
||||
if (err) {
|
||||
this.client.signale.error(`Error occurred while writing: ${err}`);
|
||||
}
|
||||
});
|
||||
this.socket.destroy();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue