Well in our town i have a spare slip lead. I leash the dog (aggressive or not) and call it in, and take it to the kennel, but then i am also the town animal control officer, and they follow me EVERYWHERE, even on my days off i can't get a break.
When i have my three walking they are on leash around town, if we are out in the forest we are on e-collars. All of them are made to approach in a friendly fashion if the owner of the approaching dog agrees, if not they are to stay "with me" and go about their business.
If a dog approaches us in a threatening manner i have a bite stick and pepper spray (and bear spray--and since we are in bear country a side arm as well)
I usually make a loud "AUGHT" and "PHST" and they usually take off. If they are friendly and no leash collar and such i do the first paragraph and usually end up citing the owner for having their animal at large!
Best thing to do, DEEP breaths and do what you can to make your dogs calm and stop or dissuade the other dog, if that does not work, stick, rock whatever, in most states you have the right to defend yourself and your "property" from damage. And yes, dogs are property in the eyes of the law.
Good Luck
Being surprised always sucks, but you'll get to the point where you can "handle" it.
Sarah