handle tcp timeouts