I actually did it to a second dog. I was cycling up a very steep hill and a dog came walking beside me and I thought nothing of it until he wrapped his teeth around my ankle. I blasted him and when he ran ahead to rub his face in the grass at the side of the road, I blasted the other end.
I had a can of chemical tear gas and found that it did not effect dogs. I sprayed one and he just licked it like nothing happened. I was also with a friend once and sprayed a dog with tear gas. Startled the dog to stop him but also got a bit on my friend. We pulled over to a stream for him to wash his face. He did not like it but was glad I deterred the dog.
Looking up tear gas chemistry I see this: "CS has less effect on animals due to under-developed tear-ducts and protection by fur." It is also more toxic than pepper spray.