Improve streaming implementation.

Now trying auto-reconnect when accidentally disconnected with long
terms.