Logic dictates no such thing.
Let’s be wary of demonizing this young man. Even if he was not physically threatened, he had a responsibility to secure the safety of his men. He lacked the authority to take any action that might create an International Incident with an Enemy State. He’d be out of bounds for ordering shots fired.
Sorry, he needs to be sitting behind a desk, not commanding a ship in a hostile zone.