Add reconnect support
Merge pull request #1 from Obvious/jamie-reconnect-support

Add reconnect support.