     {:noreply, new_state}
   end
 
-  def handle_info({:nodedown, node}, state) do
+  def handle_info({:nodedown, node}, %{em: em} = state) do
     Logger.warn "Unexpected disconnect from node: #{node}"
+    NodeConnector.Handler.notify_disconnect(em, node)
+
     case Directory.has_node?(node) do
       true ->
         new_state = attempt_connect(node, state)


  defp register_handler(em, module, args \\ []) do
    ref = make_ref()
    case GenEvent.add_handler(em, {module, ref}, args) do
      :ok   -> {:ok, ref}
      error -> error
    end

        {:noreply, state}
    end
  end

  def handle_info({:gen_event_EXIT, _, :normal}, state) do
    {:noreply, state}
  end
  def handle_info({:gen_event_EXIT, _, {:swapped, _, _}}, state) do
    {:noreply, state}
  end
  def handle_info({:gen_event_EXIT, _, :shutdown}, state) do
    {:noreply, state}
  end
  def handle_info({:gen_event_EXIT, handler, _}, %{em: em, handlers: handlers} = state) do
    args = HashDict.get(handlers, handler)
    :ok  = GenEvent.add_mon_handler(em, handler, args)
    {:noreply, state}
  end
end
