Attempt reconnect after failed stream.write
Check stream is open before writing rather than waiting for exception
Merge pull request #1 from ChartBoost/reconnect

Attempt reconnect after failed stream.write
Merge branch 'master' into rename-module