trying to reconnect if the service was disconnected, 3 attempts