JBTM-1984 Updated to only close the recoveryConnection when theModifier is not null