Fully reset connection on disconnect/error. Fixes #30

Fixes #30