smarter socket timeouts