From 1bdc68774fdb7cb3ade7b142e6ecdea3fd39fb2a Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Sat, 11 Mar 2023 15:15:11 +0200 Subject: [PATCH] Client - Fixed a possible bug whereby the `Receiver` and `Sender` may exit on start as they get to their `client.running` read before the main thread gets to setting `running = true` --- source/birchwood/client/client.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/birchwood/client/client.d b/source/birchwood/client/client.d index 5721d54..636985b 100644 --- a/source/birchwood/client/client.d +++ b/source/birchwood/client/client.d @@ -586,14 +586,14 @@ public class Client : Thread // * libsnooze exists) // */ + /* Set the running status to true */ + running = true; + /* Start the receive queue and send queue managers */ this.receiver.start(); this.sender.start(); // while(!receiver.isReady() || !sender.isReady()) {} - /* Set the running status to true */ - running = true; - /* Start the socket read-decode loop */ this.start(); }