Skip to content

Commit e7b253a

Browse files
update
1 parent edca754 commit e7b253a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/primary/traits/base_server.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,19 @@ pub trait BaseServer: Send {
3939
let (shutdown_tx, mut shutdown_rx) = mpsc::channel::<()>(1);
4040

4141
let port = Self::port(options.clone());
42+
let connection_message = format!("[{}] is started on port {}", Self::server_name(), port);
4243
let listener = TcpListener::bind(format!("127.0.0.1:{}", port)).await?;
43-
crate::debug!("[{}] is started on port {}", Self::server_name(), port);
44+
crate::debug!("{}", connection_message);
45+
46+
if options.sender.is_some() {
47+
let sender = options.sender.clone().unwrap();
48+
sender
49+
.broadcast(ClientHandlerOutput::SuccessMessage(
50+
connection_message,
51+
None,
52+
))
53+
.await?;
54+
}
4455

4556
loop {
4657
tokio::select! {

0 commit comments

Comments
 (0)