Prefer IPv4 Connections patch

This commit is contained in:
Simone 2023-11-12 19:20:19 +01:00
parent be919e23e3
commit b7a94d426a

View file

@ -15,6 +15,10 @@ module.exports = (logger, config) => {
const outgoing = require('../outgoing') const outgoing = require('../outgoing')
this.jid = null this.jid = null
// prefer IPv4 connections
const dns = require('node:dns');
dns.setDefaultResultOrder('ipv4first');
// declare send chat/groupchat function // declare send chat/groupchat function
this.send = async (to, message, type) => { this.send = async (to, message, type) => {
logger.info(`Send ${type} message to ${to}`) logger.info(`Send ${type} message to ${to}`)