JakobOvrum/Dirk

Calling client.quit() does not disconnect the client from eventloop

Opened this issue · 1 comments

If quit is called on the client, it is not removed from the eventloop as it should when it disconnects. This means run() does not return even if there are no clients left.

EDIT: Technically I'm calling diggler's CommandContext quit(), though I assume it just forwards the call.

EDIT2: In fact, removing the client manually from the event loop does not remove it from the event loop either, so I'm guessing remove is just broken.

dazoe commented

I was running into different problems with quit. When I call quit my quit message never makes it to other irc clients. I suspect it's due to quit(...) calling socket.close right after sending the quit message.
As for the eventloop, it throws an exception unless i remove the client with eventloop.remove(client) before calling client.quit(msg)