MODE-2049 Fixed repository shutdown when monitoring is not enabled