From 39b7bf7fa2112548c507cb88db79f21d165a4b3e Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sat, 9 Feb 2013 14:20:17 +0800 Subject: [PATCH] remove receiving timeout for client Now we enforce nonblocking everywhere, hopefully properly, this rx timeout stuff shouldn't be needed. Signed-off-by: Andy Green --- lib/client-handshake.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/client-handshake.c b/lib/client-handshake.c index 7a5bfd4..f3113b0 100644 --- a/lib/client-handshake.c +++ b/lib/client-handshake.c @@ -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"); -- 2.7.4