Skip to content

Commit

Permalink
fix rare crash on auth error (cancel server connect later)
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Dec 20, 2024
1 parent dd7c9c1 commit a064892
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ async function connect (connectOptions: ConnectOptions) {
} else {
const originalSetSocket = bot._client.setSocket.bind(bot._client)
bot._client.setSocket = (socket) => {
if (!bot) return
originalSetSocket(socket)
setupConnectHandlers()
}
Expand Down

0 comments on commit a064892

Please sign in to comment.