Personally, I'm inclined to leave them the way they are, because (as I wrote in another comment) adding methods can also make the code more difficult to follow. The risk to having these so similar to each other is mainly that we'd update one while not updating the other, so I could see a case for normalizing the shutdown logic into another method (again, DRY, and there is some repeating here).