OlegSea/osu-khost-bot

Bot does not terminate after disbanding match

Closed this issue · 2 comments

$ node app.js
We're online!
Lobby created! Name: McEndu's 4k and ANYTHING NOT 4K room
Multiplayer link: https://osu.ppy.sh/mp/91167751

After pressing Ctrl+C:

Closing lobby and disconnecting...

At this point, the match is no longer visible on osu! and is displayed as disbanded on the website, but no shell prompt appears.

After pressing Ctrl+C again after quite a few minutes:

Closing lobby and disconnecting...
node_modules\bancho.js\lib\OutgoingBanchoMessage.js:57
                                        reject(new Error("Currently disconnected!"));
                                               ^

Error: Currently disconnected!
    at cb (node_modules\bancho.js\lib\OutgoingBanchoMessage.js:57:13)
    at BanchoRateLimiter.waitForSendingPrivateMessage (node_modules\bancho.js\lib\BanchoRateLimiter.js:42:4)
    at node_modules\bancho.js\lib\OutgoingBanchoMessage.js:62:31
    at new Promise (<anonymous>)
    at OutgoingBanchoMessage.send (node_modules\bancho.js\lib\OutgoingBanchoMessage.js:33:10)
    at BanchoMultiplayerChannel.sendMessage (node_modules\bancho.js\lib\BanchoChannel.js:76:68)
    at node_modules\bancho.js\lib\Multiplayer\BanchoLobby.js:687:17
    at new Promise (<anonymous>)
    at BanchoLobby.closeLobby (node_modules\bancho.js\lib\Multiplayer\BanchoLobby.js:686:10)
    at process.<anonymous> (app.js:190:14)

Version: 5b5d878
Environment: Windows 10

bruh now I'm actually curious what did I write back then, lemme see if I can fix it somehow

1 line of code actually fixed the issue, lmao