wait for connection error handling