Once the socket successfully connects, don't keep trying other addresses

Many thanks to Frank Krueger for spotting this goof

Fixes issue #6