wait multiple times for connection

Broke the connecion into a max of 50 milliseconds, re-attempt to create
the connection to avoid the problem of one thread creating and before it
could run other threads consumed the resources.