updated monitoring socket
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Paul 2023-05-07 11:06:57 +02:00
parent f559fa9fd0
commit 93990307c4

View File

@ -36,8 +36,18 @@ pub async fn apiserver(ctxarc: &Arc<RwLock<Context>>) -> io::Result<()> {
.write_all(format!("{data}\n").as_bytes()) .write_all(format!("{data}\n").as_bytes())
.await .await
.unwrap(); .unwrap();
stream.flush().await.unwrap(); match stream.flush().await {
stream.shutdown().await.unwrap(); Ok(_) => {}
Err(e) => {
println!("error flushing stream: {e}")
}
}
match stream.shutdown().await {
Ok(_) => {}
Err(e) => {
println!("error shuting down stream: {e}")
}
}
} }
Err(err) => { Err(err) => {
println!("unable to serialize data: {err}"); println!("unable to serialize data: {err}");