My younger spirit may be willing for the "stand-your-ground counter aggressive" thing but my 72 YO body isn't. I already have circulation problems in my legs and any level of bad dog bites would probably cause me to lose one or both. Nope. One gets near me like described and I'm genuinely fearful, it gets it straight-off....Maybe carry OC or similar spray to use as a deterrent before deploying lead based corrective action? A good fixed blade SD knife is always a quieter option if the dog gets in on you and you need to go hands on.
I carry all the time including my dog walks and outdoor physical training partly in case a dog shows up to attack me or my dog. I've debated this in my head many times and it always comes back to how big/aggressive is the dog as the primary driver for my reaction.
Someone said it earlier, if the dog is big enough to kill you and it's on a mission then there will be no hesitation. I'll deal with the legal part once the situation is resolved. In your case OP, I think you did the responsible thing. The dog's owner, not so much.


