From: Russ Cox Date: Tue, 19 Feb 2013 15:18:16 +0000 (-0500) Subject: codereview: give up on http fetch after 30 seconds X-Git-Tag: go1.1rc2~970 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f19cf640d482480432e65a451477cd3bcf818288;p=gostls13.git codereview: give up on http fetch after 30 seconds If Python blocks in the SSL handshake it seems to be completely uninterruptible, and I've been seeing it block for at least hours recently. I don't know if the problem is on the client side or the server side or somewhere in the network, but setting the timeout at least means you're guaranteed a new shell prompt (after printing some errors). R=golang-dev, bradfitz, minux.ma CC=golang-dev https://golang.org/cl/7337048 --- diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index 9ac9dcb808..4b6014505f 100644 --- a/lib/codereview/codereview.py +++ b/lib/codereview/codereview.py @@ -2444,6 +2444,8 @@ def MySend1(request_path, payload=None, self._Authenticate() if request_path is None: return + if timeout is None: + timeout = 30 # seconds old_timeout = socket.getdefaulttimeout() socket.setdefaulttimeout(timeout)