There appears to be some confusion among the original replies in page 1. Actually there were 2 rather similar bugs.
First was that if you chose to refesh/logout when attacking a naber and choose to retreat instead of continuing combat when relogging, you could actually attack the same naber right away without the 24h waiting period. While if you retreated from combat "normally", your attack counted as failure and you got the 24h cooldown period. This allowed players to always take ideal army setups for the battle, because essentially by abusing this bug they were able to "scout" the target player defense.
2nd very similar bug was that you didn't lose any armies when you retreated, so if things went wrong, you were able to try again and again twithout any losses till you succeeded.
So I think the OP is actually about the bug1, while most of the replies are about bug2.
Btw from what I remember, those 2 bugs were prolly somewhat related but were not fixed both at once, so they overlapped a bit. Perhaps the bug1 was what remained wrong after they tryed to fix bug2, not too sure any more. But from what I do know, both of those bugs were fixed more than a month ago.