Make shutdown() return a promise