Transforming local function notify_that_host_failed into a method.