shutdown properly when the reactor signals an error