c5e887334de8b7f30beb71431559f4d9100e2aa7
galt
  Tue Oct 1 16:11:52 2013 -0700
Revert "net.c: Adding read and write timeouts to the tcp open. One site was connecting but then failing to send a response and hanging indefinitely."
This reverts commit b1daa872c111d286d607213ce0ba97d74133b9dd.

Although the relatively short 10 second read/write timeout works for bigDataUrl connections,
it does not work for robots accessing html sites that can take a long time to return a response.
This approach was too simple.  It is being reverted.

diff --git src/lib/net.c src/lib/net.c
index 84fbf79..2804ac4 100644
--- src/lib/net.c
+++ src/lib/net.c
@@ -175,45 +175,30 @@
     else
 	{
 	warn("TCP non-blocking connect() error %d - %s", errno, strerror(errno));
 	close(sd);
 	return -1;
 	}
     }
 
 // Set to blocking mode again
 if (setSocketNonBlocking(sd, FALSE) < 0)
     {
     close(sd);
     return -1;
     }
 
-//Set read and write timeouts
-struct timeval timeout;      
-timeout.tv_sec = (long) (msTimeout/1000);
-timeout.tv_usec = (long) (((msTimeout/1000)-timeout.tv_sec)*1000000);
-
-if (setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout)) < 0)
-    {
-    warn("setsockopt failed setting socket receive timeout\n");
-    }
-
-if (setsockopt(sd, SOL_SOCKET, SO_SNDTIMEO, (char *)&timeout, sizeof(timeout)) < 0)
-    {
-    warn("setsockopt failed setting socket send timeout\n");
-    }
-
 return sd;
 
 }
 
 
 int netConnect(char *hostName, int port)
 /* Start connection with a server. */
 {
 return netConnectWithTimeout(hostName, port, DEFAULTCONNECTTIMEOUTMSEC); // 10 seconds connect timeout
 }
 
 int netMustConnect(char *hostName, int port)
 /* Start connection with server or die. */
 {
 int sd = netConnect(hostName, port);