]> granicus.if.org Git - ejabberd/commitdiff
Fix cleaning of Riak route table
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Sat, 15 Apr 2017 10:36:29 +0000 (13:36 +0300)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Sat, 15 Apr 2017 10:36:29 +0000 (13:36 +0300)
src/ejabberd_router_riak.erl

index 4b270a41d880ca023e70b18fafd076840603c3ea..d775e989e4349a6d1638f541697e49f8e92aaab8 100644 (file)
@@ -74,8 +74,8 @@ clean_table() ->
     case ejabberd_riak:get(route, route_schema()) of
        {ok, Routes} ->
            lists:foreach(
-             fun(#route{pid = Pid}) ->
-                     ejabberd_riak:delete(route, Pid)
+             fun(#route{domain = Domain, pid = Pid}) ->
+                     ejabberd_riak:delete(route, {Domain, Pid})
              end, Routes);
        {error, Err} ->
            ?ERROR_MSG("failed to clean Riak 'route' table: ~p", [Err]),