darkhelmet/twitterstream — pull request #8 by rcoelho (2014-05-15 05:02:54+00:00)
Title: Bugfix: set the read deadline only when the timeout is not zero

Set the read deadline only when the timeout is not zero. This (with the.zero timeout) fixes the i/o timeout error when trying to read from streams that remain inactive for a long time (this is the case when tracking uncommon hashtags).

The current code always adds a duration to the current time. When the duration is zero (which should actually mean no deadline), the deadline expires immediately. This PR fixes this bug.