leporo/tornado-redis — pull request #62 by soulrebel (2014-04-18 17:14:34+00:00)
Title: Do not block when connecting socket

Hi,
I was running some tests in a Tornado web application that uses tornado-redis after a call to IOLoop.set_blocking_log_threshold() with a low value, to spot any blocking IO or slow sections.

This was the most recurring problem:
```
File "build/bdist.linux-x86_64/egg/tornadoredis/client.py", line 405, in execute_command
self.connection.connect()
File "build/bdist.linux-x86_64/egg/tornadoredis/connection.py", line 73, in connect
sock.connect((self.host, self.port))
```
The connection is in fact opened in blocking mode.

After this patch the problem goes away and my app seems to work.
I did not run any unit test and I am aware that this probably needs some more work, for example on connection errors.

However I urge you to try and fix this and put out a new release as it quite critical to block the IOLoop even for a small time.
Thank you