diff --git a/include/dap_client.h b/include/dap_client.h
index 29545c805ff733606b29a7392883ca9142d41a34..7a81af9734559fdf27c8efb458d548553c22a212 100755
--- a/include/dap_client.h
+++ b/include/dap_client.h
@@ -61,7 +61,8 @@ typedef enum dap_client_error {
     ERROR_STREAM_RESPONSE_WRONG,
     ERROR_STREAM_RESPONSE_TIMEOUT,
     ERROR_STREAM_FREEZED,
-    ERROR_NETWORK_CONNECTION_REFUSE
+    ERROR_NETWORK_CONNECTION_REFUSE,
+    ERROR_NETWORK_CONNECTION_TIMEOUT
 } dap_client_error_t;
 
 #define DAP_CLIENT_PROTOCOL_VERSION 22
diff --git a/src/dap_client.c b/src/dap_client.c
index 2b15fa18b62fb75095aea7fd94141425e6815544..14ed72dff2597fb613140a9946c67b3e77c23869 100644
--- a/src/dap_client.c
+++ b/src/dap_client.c
@@ -332,6 +332,7 @@ const char * dap_client_error_str(dap_client_error_t a_client_error)
         case ERROR_STREAM_CTL_ERROR: return "STREAM_CTL_ERROR";
         case ERROR_STREAM_CTL_ERROR_AUTH: return "STREAM_CTL_ERROR_AUTH";
         case ERROR_STREAM_CTL_ERROR_RESPONSE_FORMAT: return "STREAM_CTL_ERROR_RESPONSE_FORMAT";
+        case ERROR_NETWORK_CONNECTION_TIMEOUT: return "NETWORK_CONNECTION_TIMEOUT";
         default : return "UNDEFINED";
     }
 }
diff --git a/src/dap_client_http.c b/src/dap_client_http.c
index 013333bdc4fc25e4556a0a25fbbd3e3ac6bf4409..b477c5cbac000b0f0dc86c6202e632e2eaff99c3 100644
--- a/src/dap_client_http.c
+++ b/src/dap_client_http.c
@@ -218,14 +218,13 @@ static void s_http_read(dap_events_socket_t * a_es, void * arg)
 static void s_http_error(dap_events_socket_t * a_es, void * arg)
 {
     log_it(L_INFO, "http client error");
-    int l_err_code = -1;
     dap_client_http_internal_t * l_client_http_internal = DAP_CLIENT_HTTP(a_es);
     if(!l_client_http_internal) {
         log_it(L_ERROR, "s_http_write: l_client_http_internal is NULL!");
         return;
     }
     if(l_client_http_internal->error_callback)
-        l_client_http_internal->error_callback(l_err_code, l_client_http_internal->obj);
+        l_client_http_internal->error_callback((int)arg, l_client_http_internal->obj);
 
     // close connection
     dap_events_socket_kill_socket(a_es);
diff --git a/src/dap_client_pvt.c b/src/dap_client_pvt.c
index 5050fc2a4831736a7505fd85c45d2e9d0340ccdc..a5616918983cf545602c80b80c054af34eeb9efe 100644
--- a/src/dap_client_pvt.c
+++ b/src/dap_client_pvt.c
@@ -579,8 +579,7 @@ static void s_stage_status_after(dap_client_pvt_t * a_client_pvt)
             a_client_pvt->stage_status = STAGE_STATUS_ABORTING;
             // unref pvt
             //l_is_unref = true;
-        }
-        else {
+        } else if (a_client_pvt->last_error != ERROR_NETWORK_CONNECTION_TIMEOUT) {
             if(!l_is_last_attempt) {
                 // small delay before next request
                 log_it(L_INFO, "Connection attempt â„– %d", a_client_pvt->connect_attempt);
@@ -618,9 +617,9 @@ static void s_stage_status_after(dap_client_pvt_t * a_client_pvt)
         bool l_is_last_stage = (a_client_pvt->stage == a_client_pvt->stage_target);
         if(l_is_last_stage) {
             //l_is_unref = true;
-            log_it(L_NOTICE, "Stage %s is achieved",
-                    dap_client_stage_str(a_client_pvt->stage));
             if(a_client_pvt->stage_target_done_callback) {
+                log_it(L_NOTICE, "Stage %s is achieved",
+                        dap_client_stage_str(a_client_pvt->stage));
                 a_client_pvt->stage_target_done_callback(a_client_pvt->client, NULL);
                 // Expecting that its one-shot callback
                 a_client_pvt->stage_target_done_callback = NULL;
@@ -993,8 +992,11 @@ void m_enc_init_error(dap_client_t * a_client, int a_err_code)
     }
     //dap_client_internal_t * l_client_internal = dap_CLIENT_INTERNAL(a_client);
     log_it(L_ERROR, "ENC: Can't init ecnryption session, err code %d", a_err_code);
-
-    l_client_pvt->last_error = ERROR_NETWORK_CONNECTION_REFUSE;
+    if (a_err_code == ETIMEDOUT) {
+        l_client_pvt->last_error = ERROR_NETWORK_CONNECTION_TIMEOUT;
+    } else {
+        l_client_pvt->last_error = ERROR_NETWORK_CONNECTION_REFUSE;
+    }
     l_client_pvt->stage_status = STAGE_STATUS_ERROR;
     s_stage_status_after(l_client_pvt);
 }
@@ -1102,7 +1104,11 @@ void m_stream_ctl_error(dap_client_t * a_client, int a_error)
         log_it(L_ERROR, "m_stream_ctl_error: l_client_pvt is NULL!");
         return;
     }
-    l_client_pvt->last_error = ERROR_STREAM_CTL_ERROR;
+    if (a_error == ETIMEDOUT) {
+        l_client_pvt->last_error = ERROR_NETWORK_CONNECTION_TIMEOUT;
+    } else {
+        l_client_pvt->last_error = ERROR_STREAM_CTL_ERROR;
+    }
     l_client_pvt->stage_status = STAGE_STATUS_ERROR;
 
     s_stage_status_after(l_client_pvt);
@@ -1142,7 +1148,11 @@ void m_stream_error(dap_client_t * a_client, int a_error)
         log_it(L_ERROR, "m_stream_error: l_client_pvt is NULL!");
         return;
     }
-    l_client_pvt->last_error = ERROR_STREAM_RESPONSE_WRONG;
+    if (a_error == ETIMEDOUT) {
+        l_client_pvt->last_error = ERROR_NETWORK_CONNECTION_TIMEOUT;
+    } else {
+        l_client_pvt->last_error = ERROR_STREAM_RESPONSE_WRONG;
+    }
     l_client_pvt->stage_status = STAGE_STATUS_ERROR;
 
     s_stage_status_after(l_client_pvt);