From d7b7b04f7813172db79b4dba09d3fb09dc860ec5 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sun, 14 Apr 2024 23:59:04 -0400 Subject: [PATCH] Update PDAB Wrappers - Close the socket server when there are no active connections --- client/discordAudioBot/pdabWrappers.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/discordAudioBot/pdabWrappers.mjs b/client/discordAudioBot/pdabWrappers.mjs index c4d4e1f..015b7fb 100644 --- a/client/discordAudioBot/pdabWrappers.mjs +++ b/client/discordAudioBot/pdabWrappers.mjs @@ -1,4 +1,4 @@ -import { connectToChannel, leaveVoiceChannel, checkIfConnectedToVC, initDiscordBotClient, requestDiscordUsername, requestDiscordID, requestDiscordClientClose } from './pdabHandler.mjs'; +import { connectToChannel, leaveVoiceChannel, checkIfConnectedToVC, initDiscordBotClient, requestDiscordUsername, requestDiscordID, requestDiscordClientClose, closePdabSocketServer } from './pdabHandler.mjs'; import { openOP25, closeOP25 } from '../op25Handler/op25Handler.mjs'; let activeDiscordClient = undefined; @@ -50,6 +50,9 @@ export const leaveDiscordVC = async (guildId) => { // Close the python client await requestDiscordClientClose(); + + // Close the IPC server + await closePdabSocketServer(); } } }