1
0
mirror of https://github.com/deavmi/birchwood synced 2024-09-20 08:23:07 +02:00

- Added some documentation headers

- Removed uneeded TODO and FIXME
This commit is contained in:
Tristan B. Velloza Kildaire 2022-11-05 12:41:52 +02:00
parent 924ccbaacc
commit 919a0d09e9

View File

@ -631,6 +631,9 @@ public final class Client : Thread
sendQueueLock.unlock(); sendQueueLock.unlock();
} }
/**
* Disconnect from the IRC server gracefully
*/
public void quit() public void quit()
{ {
/* Generate the quit command using the custom quit message */ /* 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 */ /* TODO: I don't know how long we should wait here */
Thread.sleep(dur!("seconds")(1)); Thread.sleep(dur!("seconds")(1));
/* TODO: Tare down */ /* Tare down the client */
disconnect(); 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() private void disconnect()
{ {
/* Set the state of running to false */ /* Set the state of running to false */
running = false; running = false;
logger.log("disconnect() begin"); logger.log("disconnect() begin");
/* TODO: Should we do this here? */ /* Close the socket */
// FIXME: Catch any errors
socket.close(); socket.close();
logger.log("disconnect() socket closed"); logger.log("disconnect() socket closed");