From 313ff9b557a8fb5a5d8b143d61e96bda0602b534 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Sun, 26 Nov 2023 14:15:59 +0200 Subject: [PATCH] Connection - Removed now-completed TODO - Use a boolean to supress unreachable errors - Added a TODO to implement the above - On exiting loop call the `Server`'s `onConnectionDisconnect(Connection)` method --- source/renaissance/connection/connection.d | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/source/renaissance/connection/connection.d b/source/renaissance/connection/connection.d index e410a4d..728e345 100644 --- a/source/renaissance/connection/connection.d +++ b/source/renaissance/connection/connection.d @@ -96,8 +96,9 @@ public class Connection : Thread // TODO: Well, we'd tasky I guess so I'd need to use it there I guess - // TODO: Add worker function here - while(true) + // TODO: Imp,ent nthe loop condition status (exit on error) + bool isGood = true; + while(isGood) { // TODO: Addn a tasky/tristanable queue managing thing with // ... socket here (probably just the latter) @@ -130,7 +131,11 @@ public class Connection : Thread } } - // TODO: Call cleanup+notify server + // Clean up (TODO: Shutdown the TManager) + + + // Clean up - notify disconnection + this.associatedServer.onConnectionDisconnect(this); } // FIXME: These should be part of the auth details