That one is really tricky. I would like you can surrender when locked in battle, but you can be locked into more than one battle and surrender to your friend. Nice catch.
For the moment, I disable surrender while in battle. Logic being that your enemy might not want your surrender, he may insist on fighting. I would like to have a logic that says "I accept your surrender, let's not fight", but that requires a 2-person interaction and is much more tricky to code.