hopefully close rtc connection on ws gateway close
This commit is contained in:
parent
dffba219d6
commit
4cd8e22a78
1 changed files with 3 additions and 0 deletions
|
@ -69,6 +69,9 @@ class GatewayServer extends EventEmitter {
|
|||
ws.on("pong", () => {
|
||||
ws.alive = true;
|
||||
});
|
||||
ws.on("close", async () => {
|
||||
if (ws.rtc) await ws.rtc.close();
|
||||
});
|
||||
ws.on("message", async (data) => {
|
||||
try {
|
||||
const message = parseMessage(data);
|
||||
|
|
Reference in a new issue