This is an automated email from the ASF dual-hosted git repository.

piotr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iggy.git


The following commit(s) were added to refs/heads/master by this push:
     new 5b891879 chore(server): print more detailed error log when connection 
fails (#1764)
5b891879 is described below

commit 5b8918795a00cc69d238280351338b54be5bf695
Author: Cancai Cai <[email protected]>
AuthorDate: Sat May 10 17:57:57 2025 +0800

    chore(server): print more detailed error log when connection fails (#1764)
    
    When the connection fails, we can print a more detailed error log to let 
the user know how to solve it.
---
 =                              | 0
 core/sdk/src/tcp/tcp_client.rs | 6 +++---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/= b/=
new file mode 100644
index 00000000..e69de29b
diff --git a/core/sdk/src/tcp/tcp_client.rs b/core/sdk/src/tcp/tcp_client.rs
index 38577e4e..fd7aa093 100644
--- a/core/sdk/src/tcp/tcp_client.rs
+++ b/core/sdk/src/tcp/tcp_client.rs
@@ -285,10 +285,10 @@ impl TcpClient {
             );
 
             let connection = 
TcpStream::connect(&self.config.server_address).await;
-            if connection.is_err() {
+            if let Err(err) = &connection {
                 error!(
-                    "Failed to connect to server: {}",
-                    self.config.server_address
+                    "Failed to connect to server: {}. Error: {}",
+                    self.config.server_address, err
                 );
                 if !self.config.reconnection.enabled {
                     warn!("Automatic reconnection is disabled.");

Reply via email to