I've seen this happen a couple of times.
If a cannon has 1 shield, it seems to hesitate attacking when it's attacked.
Is it something to do with losing/regaining 1 shield quickly? This don't happen to other Protoss units as far as I know...
*Edit* Silly me, I guess it was just the map I played. Maybe something do with sprite limit, though I rarely see it. Just a mistake, someone close this...