bitcoin/bitcoin — pull request #4869 by laanwj (2014-09-08 11:59:09+00:00)
Title: 2014 09 socks5 negotiation

(dependent on #4868)

Avoids that SOCKS5 negotiation will hold up the shutdown process.

- Sockets can stay in non-blocking mode, no need to switch it on/off anymore
- Adds a timeout (20 seconds) on SOCKS5 negotiation. This should be enough for even Tor to get a connection to a hidden service, and avoids blocking the opencon thread indefinitely on a hanging proxy.

Fixes #2954.