new clients are added first

This commit is contained in:
Evan Feenstra
2023-06-06 11:02:21 -07:00
parent 98c13041ff
commit b7b4caac46

View File

@@ -21,7 +21,8 @@ impl Connections {
pub fn add_client(&mut self, cid: &str) {
let cids = cid.to_string();
if !self.clients.contains(&cids) {
self.clients.push(cids)
// new client is added to beginning of Vec
self.clients.insert(0, cids);
}
}
pub fn remove_client(&mut self, cid: &str) {