Beware the baton- swinging a baton can cause you to lose your balance and crash- it doesn't even need to go into the spokes as above- if you're holding a club then only one hand is on the handlebars. I nearly crashed just brushing a bee off a riding partner's back.
Best to stop, put the bike between you and the dog, then grab the baton/pepper spray/ammonia if necessary.