nym-connect: append error to failed message (#1839)

* nym-connect: append error to failed message

* changelog: add note
This commit is contained in:
Jon Häggblad
2022-12-05 15:58:59 +01:00
committed by GitHub
parent a16c566719
commit 028bee804b
2 changed files with 9 additions and 5 deletions
+4
View File
@@ -1,3 +1,7 @@
## UNRELEASED
- nym-connect: fix issue with actual socks5 error message not being appened to the error message sent to the frontend.
## [nym-connect-v1.1.1](https://github.com/nymtech/nym/tree/nym-connect-v1.1.1) (2022-11-29)
- socks5-client: fix multiplex concurrent connections ([#1720], [#1777])
+5 -5
View File
@@ -19,7 +19,7 @@ pub enum Socks5StatusMessage {
/// The SOCKS5 task successfully stopped
Stopped,
/// The SOCKS5 task failed to start
FailedToStart,
Failed(Box<dyn std::error::Error + Send>),
}
/// The main SOCKS5 client task. It loads the configuration from file determined by the `id`.
@@ -56,7 +56,7 @@ pub fn start_nym_socks5_client(
if let Err(err) = result {
log::error!("SOCKS5 proxy failed: {err}");
socks5_status_tx
.send(Socks5StatusMessage::FailedToStart)
.send(Socks5StatusMessage::Failed(err))
.expect("Failed to send status message back to main task");
return;
}
@@ -98,14 +98,14 @@ pub fn start_disconnect_listener(
)
.unwrap();
}
Ok(Socks5StatusMessage::FailedToStart) => {
log::info!("SOCKS5 task reported it failed to start");
Ok(Socks5StatusMessage::Failed(err)) => {
log::info!("SOCKS5 task reported error: {}", err);
window
.emit(
"socks5-event",
Payload {
title: "SOCKS5 error".into(),
message: "SOCKS5 failed to start".into(),
message: format!("SOCKS5 failed: {}", err),
},
)
.unwrap();