Merge pull request #4 from johanlundberg/master

Updated the documentation
Try again if the connection gets in a bad state.