Fixes #201
Reconnect on socket error
Merge pull request #203 from aesedepece/coseme-autoreconnect

Reconnect on socket error
Merge pull request #202 from aesedepece/fix-for-issue-201

Fixes #201