Increase IRC timeout delay

This commit is contained in:
Yarmo Mackenbach 2021-04-09 14:25:05 +02:00
parent 6481d4f405
commit be547b0e5d
No known key found for this signature in database
GPG key ID: 37367F4AF4087AD1

View file

@ -20,7 +20,7 @@ module.exports = async (hostname, nickQuery, opts) => {
const timeoutPromise = new Promise((resolve, reject) => { const timeoutPromise = new Promise((resolve, reject) => {
timeoutHandle = setTimeout( timeoutHandle = setTimeout(
() => reject(new Error('Request was timed out')), () => reject(new Error('Request was timed out')),
5000 20000
) )
}) })
@ -39,6 +39,7 @@ module.exports = async (hostname, nickQuery, opts) => {
client.send(`PRIVMSG NickServ :TAXONOMY ${nickQuery}`) client.send(`PRIVMSG NickServ :TAXONOMY ${nickQuery}`)
}) })
client.addListener('notice', (nick, to, text, message) => { client.addListener('notice', (nick, to, text, message) => {
console.log(text);
if (reKey.test(text)) { if (reKey.test(text)) {
const match = text.match(reKey) const match = text.match(reKey)
keys.push(match[1]) keys.push(match[1])