breaking from loop on "connectionEstablished=true"