I believe there is a way to cancel an attack (eg. when the attacker is clearly losing the battle): sometime when I open the game I see the message in the title, but when I come back in a few mins, nothing is changed.
Is it possible to be a glitch? It happens more often when I have resources, so that would be such a strange coincidence
One way I can think of how to do this is to stop the wireless, but I didn't test it.
I think the battle should end no matter what (with the deployed troops at time of conn. lost)