merge-requests/6/head
Matthew 2021-08-09 14:37:45 -04:00
parent 406ba69637
commit 39d8760f5f
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 5 additions and 1 deletions

View File

@ -30,7 +30,11 @@ export default class Context {
public send(v: string) { public send(v: string) {
console.log(this.socket); 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(); this.socket.destroy();
} }
} }