If he were my dog, I'd prevent it from happening at all by keeping him on a long line attached to a harness (because if he ever does hit the end of the long line at speed you don't want that kind of force on his neck). He's at that adolescent phase where you aren't as interesting anymore and he's both more interested in the world (and particularly other dogs) around him and experimenting with pushing boundaries. This is a case where I'd both want to prevent him from practicing unwanted behavior - especially in a way that's actively rewarding because he gets to interact with other dogs - and can be actively dangerous for him, if said other dog isn't a fan of enthusiastic teenagers charging up to say hello.