changed connect/disconnect error handling
Merge pull request #8 from mleich/master

changed connect/disconnect error handling