From 4f63cb21c26e956b0f65e112357c15cadd1a3ed4 Mon Sep 17 00:00:00 2001 From: Nathan Bruning Date: Sun, 3 Aug 2014 21:03:16 +0200 Subject: [PATCH] Fix migration of pubsub nodes. Was deleting and re-creating all nodes on each startup. --- src/mod_pubsub.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod_pubsub.erl b/src/mod_pubsub.erl index 3dbbabe9f..91b5afead 100644 --- a/src/mod_pubsub.erl +++ b/src/mod_pubsub.erl @@ -690,9 +690,9 @@ update_node_database(Host, ServerHost) -> end, mnesia:transaction(fun () -> case catch mnesia:first(pubsub_node) of - {_, L} when is_binary(L) -> + {_, L} when is_list(L) -> lists:foreach(fun ({H, N}) - when is_binary(N) -> + when is_list(N) -> [Node] = mnesia:read({pubsub_node, {H,