diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c
index 76bdbfc5..66b1e4e2 100644
--- a/src/openvpn/socket.c
+++ b/src/openvpn/socket.c
@@ -1464,13 +1464,26 @@ openvpn_connect(socket_descriptor_t sd,
 #endif
         )
     {
+        /* Non-blocking connection is in the progress and can be likely
+         * established within the first second with no need for imprecise
+         * sleeping in loop.
+         */
+        bool connect_wait = (connect_timeout > 0);
         while (true)
         {
 #if POLL
+            int timeout = 0;
             struct pollfd fds[1];
+
             fds[0].fd = sd;
             fds[0].events = POLLOUT;
-            status = poll(fds, 1, 0);
+            if (connect_wait)
+            {
+                connect_wait = false;
+                timeout = 1000;
+            }
+
+            status = poll(fds, 1, timeout);
 #else
             fd_set writes;
             struct timeval tv;
@@ -1479,6 +1492,11 @@ openvpn_connect(socket_descriptor_t sd,
             openvpn_fd_set(sd, &writes);
             tv.tv_sec = 0;
             tv.tv_usec = 0;
+            if (connect_wait)
+            {
+                connect_wait = false;
+                tv.tv_sec = 1;
+            }
 
             status = select(sd + 1, NULL, &writes, NULL, &tv);
 #endif
