remove receiving timeout for client 37/3037/1
authorAndy Green <andy.green@linaro.org>
Sat, 9 Feb 2013 06:20:17 +0000 (14:20 +0800)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 7 Mar 2013 21:01:32 +0000 (13:01 -0800)
Now we enforce nonblocking everywhere, hopefully properly,
this rx timeout stuff shouldn't be needed.

Signed-off-by: Andy Green <andy.green@linaro.org>
lib/client-handshake.c

index 7a5bfd4..f3113b0 100644 (file)
@@ -5,7 +5,6 @@ struct libwebsocket *__libwebsocket_client_connect_2(
        struct libwebsocket *wsi
 ) {
        struct pollfd pfd;
-       struct timeval tv;
        struct hostent *server_hostent;
        struct sockaddr_in server_addr;
        int n;
@@ -72,11 +71,6 @@ struct libwebsocket *__libwebsocket_client_connect_2(
                                                            &opt, sizeof(opt));
 #endif
 
-       /* Set receiving timeout */
-       tv.tv_sec = 0;
-       tv.tv_usec = 100 * 1000;
-       setsockopt(wsi->sock, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv, sizeof tv);
-
        if (connect(wsi->sock, (struct sockaddr *)&server_addr,
                                             sizeof(struct sockaddr)) == -1)  {
                lwsl_debug("Connect failed\n");