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())
.await
.unwrap();
stream.flush().await.unwrap();
stream.shutdown().await.unwrap();
match stream.flush().await {
Ok(_) => {}
Err(e) => {
println!("error flushing stream: {e}")
}
}
match stream.shutdown().await {
Ok(_) => {}
Err(e) => {
println!("error shuting down stream: {e}")
}
}
}
Err(err) => {
println!("unable to serialize data: {err}");