cvmts: nope I have to fix it properly

This commit is contained in:
modeco80
2024-06-19 18:20:41 -04:00
parent e798ff5c86
commit fa23aa7432
2 changed files with 5 additions and 5 deletions

View File

@@ -78,10 +78,7 @@ export class User {
if (!this.socket.isOpen()) return;
clearInterval(this.nopSendInterval);
this.nopSendInterval = setInterval(() => this.sendNop(), 5000);
this.socket.send(msg)
.catch((err: Error) => {
this.logger.Error(`bandaid fix: ${err.message}`);
});
this.socket.send(msg);
}
private onNoMsg() {

View File

@@ -35,6 +35,9 @@ export default class WSClient extends EventEmitter implements NetworkClient {
}
send(msg: string): Promise<void> {
return new Promise((res,rej) => {
if(!this.isOpen())
res();
this.socket.send(msg, (err) => {
if (err) {
rej(err);