Shutdown cleanly when the driver is stopped.

I think this should be in stateStop()