The stop function called internally by the command handler, which calls the customizable function onStop.