Updating connection state when connecting to a network for a first time