Merge pull request #49 from roamm/master

Fix for issue #45 makes it impossible to re-connect after a networking issue or peer close