I've used the Halt spray several times over the years, and it has never failed me, even with ghetto dogs.
The can is velcroed to my top tube where it is always get-atable, and I pull it out whenever I see or hear
a dog threat. My brandishing the can usually elicits a hurried response to restrain the dog by its owner
Some say that it doesn't work well on the really crazy breeds like pit bulls. but I've never had to try it out on them. As a backup I plan to purchase an expandable baton, as the brandishing or swinging any long item will usually stop an attacking dog; and in case they they do bite, they will bite the stick and not you.
I've been bitten and treated in a multi-day hospital stay because of a dog attack, so I have no patience and take no chances with dogs or their dips**t owners. The owners of the worst dogs are usually judgement proof, so you have little chance of recovering damages if you are hurt, and the light legal fines won't remove your scars.
BTW: Not to diminish the hazard of ANY dog, the worst of the group are the males who have female owners;
the thing speaks for itself.
Sounds like it wouldn't have helped the OP, dog that tagged him was running silent.