diff --git a/lib/client-handshake.c b/lib/client-handshake.c
index 435804604fdc269e7a148314b4368a5d9f33731b..86cc5ba18b12268eb6991597d5952c2c21f9c256 100644
--- a/lib/client-handshake.c
+++ b/lib/client-handshake.c
@@ -359,6 +359,7 @@ lws_client_connect(struct lws_context *context, const char *address,
 	wsi->state = LWSS_CLIENT_UNCONNECTED;
 	wsi->protocol = NULL;
 	wsi->pending_timeout = NO_PENDING_TIMEOUT;
+	wsi->position_in_fds_table = -1;
 
 #ifdef LWS_OPENSSL_SUPPORT
 	wsi->use_ssl = ssl_connection;