remove send_options_bots array (#129)

fixes ticket #1983

Co-authored-by: rhonda hollis <rhonda@jambonz.org>
This commit is contained in:
rhondahollis
2026-02-12 10:15:47 -07:00
committed by GitHub
parent 6f9c629379
commit a21269cb19
2 changed files with 2 additions and 4 deletions

View File

@@ -2,7 +2,6 @@ const { addSipGatewayToBlacklist, removeSipGatewayFromBlacklist, isSipGatewayBla
const {OPTIONS_RESPONSE_REMOVE} = require('./config');
const send_options_gateways = [];
const send_options_bots = [];
class OptionsBot {
constructor(logger, gateway) {
@@ -93,6 +92,7 @@ class OptionsBot {
}
module.exports = async(logger, srf) => {
const updateSipGatewayOptsBot = async(logger, srf) => {
try {
@@ -105,10 +105,9 @@ module.exports = async(logger, srf) => {
send_options_gateways.push(...gws);
for (const g of send_options_gateways) {
const optsBot = new OptionsBot(logger, g);
send_options_bots.push(optsBot);
optsBot.options(srf);
}
logger.debug(`updateSipGatewayOptsBot: we have started ${send_options_bots.length} optionsBots`);
logger.debug(`updateSipGatewayOptsBot: we have started ${send_options_gateways.length} optionsBots`);
}
} catch (err) {
logger.error({ err }, 'updateSipGatewayOptsBot Error');