25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-30 16:36:29 +01:00

Fix cluster race condition in route read (thanks to Alexey Shchepin)

This commit is contained in:
Badlop 2010-02-15 18:37:42 +01:00
parent df2878739c
commit fa4ebab036

View File

@ -101,7 +101,7 @@ register_route(Domain, LocalHint) ->
mnesia:transaction(F); mnesia:transaction(F);
N -> N ->
F = fun() -> F = fun() ->
case mnesia:read({route, LDomainB}) of case mnesia:wread({route, LDomainB}) of
[] -> [] ->
mnesia:write( mnesia:write(
#route{domain = LDomainB, #route{domain = LDomainB,