Race condition in connectivity test