Fix frequent reconnection for streaming APIs

Small patch to fix frequent (and unintended) reconnection when working with streaming APIs such as Twitter's streaming API.