diff --git a/lib/conncache.c b/lib/conncache.c
index 43d885131f..b8f5444856 100644
--- a/lib/conncache.c
+++ b/lib/conncache.c
@@ -307,7 +307,7 @@ CURLcode Curl_conncache_add_conn(struct conncache *connc,
   unlock:
   CONN_UNLOCK(data);
 
-  return CURLE_OK;
+  return result;
 }
 
 void Curl_conncache_remove_conn(struct connectdata *conn, bool lock)