diff --git a/src/common/sessiond-comm/inet.c b/src/common/sessiond-comm/inet.c
index f55482e..b29a9f2 100644
--- a/src/common/sessiond-comm/inet.c
+++ b/src/common/sessiond-comm/inet.c
@@ -17,6 +17,7 @@
 
 #define _GNU_SOURCE
 #include <assert.h>
+#include <fcntl.h>
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -99,9 +100,18 @@ int lttcomm_connect_inet_sock(struct lttcomm_sock *sock)
 {
 	int ret, closeret;
 
+	ret = fcntl(sock->fd, F_SETFL, O_NONBLOCK);
+	if (ret < 0) {
+		PERROR("fcntl O_NONBLOCK");
+		goto error;
+	}
+
 	ret = connect(sock->fd, (struct sockaddr *) &sock->sockaddr.addr.sin,
 			sizeof(sock->sockaddr.addr.sin));
 	if (ret < 0) {
+		if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINPROGRESS) {
+			ERR("connect() is about to block");
+		}
 		/*
 		 * Don't print message on connect error, because connect is used in
 		 * normal execution to detect if sessiond is alive.
@@ -109,6 +119,12 @@ int lttcomm_connect_inet_sock(struct lttcomm_sock *sock)
 		goto error_connect;
 	}
 
+	ret = fcntl(sock->fd, F_SETFL, ~O_NONBLOCK);
+	if (ret < 0) {
+		PERROR("fcntl O_NONBLOCK");
+		goto error;
+	}
+
 	return ret;
 
 error_connect:
@@ -116,7 +132,7 @@ error_connect:
 	if (closeret) {
 		PERROR("close inet");
 	}
-
+error:
 	return ret;
 }
 
