Using new `addConnection` which aims to be thread safe.

This commit is contained in:
Tristan B. Kildaire 2020-06-16 18:32:17 +02:00
parent 60cd993472
commit 5c13fa3c77
2 changed files with 2 additions and 1 deletions

View File

@ -79,7 +79,7 @@ public class BesterListener : Thread
besterConnection.start();
/* Add this client to the list of connected clients */
server.clients ~= besterConnection;
server.addConnection(besterConnection);
}
/* Close the socket */

View File

@ -103,6 +103,7 @@ public final class BesterServer
/**
* Append the connection to the array
*/
clients ~= connection;
/**
* Release the mutex so other listeners can now append