Handle restarts of the mogilefsd processes by reconnecting on a disconnect. End the event loop after all mogilefsd processes have gone away.