Fixed connection leak. Added break statement after the first successful
connection that doesn't throw an error.
Merge pull request #32 from NicholasAStuart/master

Fixed connection leak.