Would probably have fired a round or two into the ground to see if they would stop. Attempt to back out of the fence. If dog is still charging, I would have stopped it.
Daughter had a similar situation about 3AM a man knocked on her door. He wouldn't leave at her command so she called sheriff. Warned dispatcher there were dogs in back yard. Deputy responded to the call and immediately went to the back. Two great danes slept through it in the dog house. The third one, old female weighing in at excess of 150, got to rear of officer and began to growl. The high and shrill voice must have scared the dog and the officr was let into the house. Dogs are friendly, but it would take a total idiot to walk into their area. Three big ***** dogs.