From 919a0d09e960d6dec8d54e24e4e3b8f0ff8141ac Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Sat, 5 Nov 2022 12:41:52 +0200 Subject: [PATCH] - Added some documentation headers - Removed uneeded TODO and FIXME --- source/birchwood/client.d | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/source/birchwood/client.d b/source/birchwood/client.d index f0b066b..95fe656 100644 --- a/source/birchwood/client.d +++ b/source/birchwood/client.d @@ -631,6 +631,9 @@ public final class Client : Thread sendQueueLock.unlock(); } + /** + * Disconnect from the IRC server gracefully + */ public void quit() { /* Generate the quit command using the custom quit message */ @@ -640,19 +643,22 @@ public final class Client : Thread /* TODO: I don't know how long we should wait here */ Thread.sleep(dur!("seconds")(1)); - /* TODO: Tare down */ + /* Tare down the client */ disconnect(); } - /* Attempt to tare down everything */ + /** + * Tare down the client by setting the run state + * to false, closing the socket, stopping the + * receieve and send handlers and the event engine + */ private void disconnect() { /* Set the state of running to false */ running = false; logger.log("disconnect() begin"); - /* TODO: Should we do this here? */ - // FIXME: Catch any errors + /* Close the socket */ socket.close(); logger.log("disconnect() socket closed");