Skip to content
This repository was archived by the owner on Apr 3, 2019. It is now read-only.

Do not block when connecting socket#62

Open
neg3ntropy wants to merge 1 commit into
leporo:masterfrom
neg3ntropy:master
Open

Do not block when connecting socket#62
neg3ntropy wants to merge 1 commit into
leporo:masterfrom
neg3ntropy:master

Conversation

@neg3ntropy
Copy link
Copy Markdown

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

@leporo
Copy link
Copy Markdown
Owner

leporo commented Apr 18, 2014

Thanks, I'll see why unit tests are failing.

@AeroNotix
Copy link
Copy Markdown

@soulrebel can you rebase this PR?

@neg3ntropy
Copy link
Copy Markdown
Author

Sorry guys, I have now moved to other projects, technologies and even languages to help out on this.

@AeroNotix
Copy link
Copy Markdown

Good for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants