client connect must init position_in_fds_table
authorAndrejs Hanins <andrejs.hanins@ubnt.com>
Mon, 22 Feb 2016 15:35:12 +0000 (23:35 +0800)
committerAndy Green <andy.green@linaro.org>
Mon, 22 Feb 2016 15:35:31 +0000 (23:35 +0800)
lib/client-handshake.c

index 7ec045cf153dacbe5e8ab2391f4a265e0e422a52..96854afe75998c5dc6f68cda0518469955d28ce0 100644 (file)
@@ -394,6 +394,7 @@ lws_client_connect_via_info(struct lws_client_connect_info *i)
        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 = i->ssl_connection;