Skip to content

Commit

Permalink
Cleanly close the websocket connection on complete.
Browse files Browse the repository at this point in the history
  • Loading branch information
thebracket committed Jan 13, 2025
1 parent a7af216 commit f3fe9e9
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand Down

0 comments on commit f3fe9e9

Please sign in to comment.