Fix a segmentation fault when an initial connection attempt fails.
Merge pull request #5 from potatosalad/connect-segmentation-fault

Fix a segmentation fault when an initial connection attempt fails.
Bumped version to 0.2.1