|
@@ -14,7 +14,6 @@ use std::{
|
|
collections::{HashMap, HashSet},
|
|
collections::{HashMap, HashSet},
|
|
ops::Deref,
|
|
ops::Deref,
|
|
sync::Arc,
|
|
sync::Arc,
|
|
- time::Instant,
|
|
|
|
};
|
|
};
|
|
use tokio::{
|
|
use tokio::{
|
|
net::{TcpListener, TcpStream},
|
|
net::{TcpListener, TcpStream},
|
|
@@ -144,8 +143,6 @@ impl<T: Storage + Send + Sync + 'static> Relayer<T> {
|
|
|
|
|
|
let handle = tokio::spawn(async move {
|
|
let handle = tokio::spawn(async move {
|
|
loop {
|
|
loop {
|
|
- let start = Instant::now();
|
|
|
|
- println!("{}", client_pool_receiver.len());
|
|
|
|
tokio::select! {
|
|
tokio::select! {
|
|
Ok((stream, _)) = server.accept() => {
|
|
Ok((stream, _)) = server.accept() => {
|
|
// accept new connections
|
|
// accept new connections
|
|
@@ -177,8 +174,6 @@ impl<T: Storage + Send + Sync + 'static> Relayer<T> {
|
|
};
|
|
};
|
|
|
|
|
|
let _ = connection.respond(Response::EndOfStoredEvents(sub_id.into()));
|
|
let _ = connection.respond(Response::EndOfStoredEvents(sub_id.into()));
|
|
- let duration = start.elapsed();
|
|
|
|
- println!("xTime elapsed: {} ms", duration.as_millis());
|
|
|
|
}
|
|
}
|
|
_ => {}
|
|
_ => {}
|
|
}
|
|
}
|