fixed return on successful connection bug introduced with multiple connection attempts