From 3f3bf6071eadeecb9247a5463eae6c91e3f4894c Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Tue, 20 Oct 2020 09:55:55 +0200 Subject: [PATCH] Initialize properties lock --- source/dnetd/dconnection.d | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/dnetd/dconnection.d b/source/dnetd/dconnection.d index 1fa27ad..3f519e5 100644 --- a/source/dnetd/dconnection.d +++ b/source/dnetd/dconnection.d @@ -69,7 +69,15 @@ public class DConnection : Thread private ConnectionType connType; private string username; private string currentStatus; + + /** + * User property support + * + * `properties` - the property store + * `propertiesMutex` - the mutex + */ private string[string] properties; /* TODO: New, replace old status mechanism */ + private Mutex propertiesLock; /* Write lock for socket */ /* TODO: Forgot how bmessage works, might need, might not, if multipel calls @@ -120,6 +128,9 @@ public class DConnection : Thread /* Initialize the status message lock */ statusMessageLock = new Mutex(); + + /* Initialize the properties lock */ + propertiesLock = new Mutex(); } /**