From 90b91bc0e4862a16ffb98aa630ae1dfa7f61c0c3 Mon Sep 17 00:00:00 2001 From: MDMCK10 <21245760+MDMCK10@users.noreply.github.com> Date: Wed, 5 Apr 2023 19:33:25 +0200 Subject: [PATCH] No more QMP deadlocks? It's more likely than you think. --- src/QMPClient.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/QMPClient.ts b/src/QMPClient.ts index 7232f77..796fa80 100644 --- a/src/QMPClient.ts +++ b/src/QMPClient.ts @@ -52,6 +52,7 @@ export default class QMPClient extends EventEmitter { try { msg = JSON.parse(msgraw); } catch { + this.emit("qmpreturn", ''); return; } @@ -150,4 +151,4 @@ export default class QMPClient extends EventEmitter { res(await this.execute({execute: "human-monitor-command", arguments: {"command-line": command}})); }); } -} \ No newline at end of file +}