improve connect waiting