Added service redistry,
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
use crate::{queue::{Message, MsgType}, utils::GenID};
|
||||
use crate::{
|
||||
queue::{Message, MsgType},
|
||||
utils::GenID,
|
||||
};
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
sync::{
|
||||
@ -181,7 +184,7 @@ mod clientlinks {
|
||||
let rx_client = link.send(req);
|
||||
let msg = rx.recv_timeout(TIMEOUT).unwrap();
|
||||
match msg.get_class() {
|
||||
MsgType::ClientRequest => {},
|
||||
MsgType::ClientRequest => {}
|
||||
_ => unreachable!("should have been a client request"),
|
||||
}
|
||||
match msg.get_data().get("tx_id") {
|
||||
@ -189,7 +192,7 @@ mod clientlinks {
|
||||
let id = result.to_uuid().unwrap();
|
||||
registry.send(&id, Reply {});
|
||||
rx_client.recv().unwrap();
|
||||
},
|
||||
}
|
||||
None => unreachable!("should have had a seender id"),
|
||||
}
|
||||
}
|
||||
@ -204,7 +207,7 @@ impl Client {
|
||||
fn new(rx: Receiver<Message>) -> Self {
|
||||
Self {
|
||||
registry: ClientRegistry::new(),
|
||||
rx: rx
|
||||
rx: rx,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user