debugging

set timeout to 3 seconds for all requests and if the socket timeouts it
returns -1