diff --git a/src/ejabberd_router.erl b/src/ejabberd_router.erl index 79cc6e1f2..fe2f67707 100644 --- a/src/ejabberd_router.erl +++ b/src/ejabberd_router.erl @@ -101,7 +101,7 @@ register_route(Domain, LocalHint) -> mnesia:transaction(F); N -> F = fun() -> - case mnesia:read({route, LDomainB}) of + case mnesia:wread({route, LDomainB}) of [] -> mnesia:write( #route{domain = LDomainB,