discord-irc / irc-websockets

websockets wrapper around irc
MIT License
0 stars 0 forks source link

TypeError: Cannot read properties of null (reading 'requestedDisconnect') #12

Open ChillerDragon opened 1 month ago

ChillerDragon commented 1 month ago
[*] popping message from queue (13 left)
[*] popping message from queue (12 left)
[*] popping message from queue (11 left)
[*] popping message from queue (10 left)
[*] popping message from queue (9 left)
[*] popping message from queue (8 left)
/home/chiller/git/irc-websockets/node_modules/irc/lib/irc.js:936
    if (!this.conn.requestedDisconnect) {
                   ^

TypeError: Cannot read properties of null (reading 'requestedDisconnect')
    at Client.send (/home/chiller/git/irc-websockets/node_modules/irc/lib/irc.js:936:20)
    at /home/chiller/git/irc-websockets/node_modules/irc/lib/irc.js:1076:22
    at Array.forEach (<anonymous>)
    at /home/chiller/git/irc-websockets/node_modules/irc/lib/irc.js:1075:25
    at Array.forEach (<anonymous>)
    at Client._speak (/home/chiller/git/irc-websockets/node_modules/irc/lib/irc.js:1073:12)
    at Client.say (/home/chiller/git/irc-websockets/node_modules/irc/lib/irc.js:1060:10)
    at sendIrc (/home/chiller/git/irc-websockets/dist/irc.js:50:12)
    at Timeout.popQueueEntry [as _onTimeout] (/home/chiller/git/irc-websockets/dist/features/webhooks.js:57:28)
    at listOnTimeout (node:internal/timers:569:17)

Node.js v18.17.1
ChillerDragon commented 2 weeks ago

This happend when getting kicked for spamming with a webhook so that should be easy to reproduce and fix

[*] popping message from queue (46 left)
[*] popping message from queue (45 left)
/home/chiller/git/irc-websockets/node_modules/irc/lib/irc.js:936
    if (!this.conn.requestedDisconnect) {
                   ^

TypeError: Cannot read properties of null (reading 'requestedDisconnect')
    at Client.send (/home/chiller/git/irc-websockets/node_modules/irc/lib/irc.js:936:20)
    at /home/chiller/git/irc-websockets/node_modules/irc/lib/irc.js:1076:22
    at Array.forEach (<anonymous>)
    at /home/chiller/git/irc-websockets/node_modules/irc/lib/irc.js:1075:25
    at Array.forEach (<anonymous>)
    at Client._speak (/home/chiller/git/irc-websockets/node_modules/irc/lib/irc.js:1073:12)
    at Client.say (/home/chiller/git/irc-websockets/node_modules/irc/lib/irc.js:1060:10)
    at sendIrc (/home/chiller/git/irc-websockets/dist/irc.js:50:12)
    at Timeout.popQueueEntry [as _onTimeout] (/home/chiller/git/irc-websockets/dist/features/webhooks.js:57:28)
    at listOnTimeout (node:internal/timers:569:17)

Node.js v18.17.1