diff --git a/src/rust/lqosd/src/lts2_sys/lts2_client/ingestor/message_queue.rs b/src/rust/lqosd/src/lts2_sys/lts2_client/ingestor/message_queue.rs index e7896c78..66386b8c 100644 --- a/src/rust/lqosd/src/lts2_sys/lts2_client/ingestor/message_queue.rs +++ b/src/rust/lqosd/src/lts2_sys/lts2_client/ingestor/message_queue.rs @@ -287,6 +287,10 @@ impl MessageQueue { return Ok(()); } } + if let Err(e) = socket.close(None) { + warn!("Failed to close connection to server: {}", e); + return Ok(()); + } drop(socket); println!("Finished sending messages to {}", remote_host); Ok(())