-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dgw): polish scanner, fix issues #715
Conversation
It’s now closing but not in a clean way. Everything should be good if you add this line: index 440d2f5..4b58f17 100644
--- a/devolutions-gateway/src/api/net.rs
+++ b/devolutions-gateway/src/api/net.rs
@@ -74,6 +74,8 @@ pub async fn handle_network_scan(
info!("Network scan finished");
stream.stop();
+
+ let _ = websocket.close().await;
});
Ok(res) |
I added this at where the stream receives none |
Why not just keep this at the end? stream.stop();
let _ = websocket.close().await; This looks less error-prone to me. Is it causing any problem? |
Not really, it‘s just the logic to me. looks more precise, if the select ends because of the second branch, where the client sends close message, it feels not right to send back a message on a closed connection. Though, it practially makes little difference. |
779836a
to
4c6b6a0
Compare
fixes the folloing issue
Issue: DGW-131