During halt only shutdown MUC rooms on local node

This commit is contained in:
Evgeniy Khramtsov 2015-07-08 15:35:26 +03:00
parent 6604b9efbb
commit a168340838
1 changed files with 2 additions and 1 deletions

View File

@ -115,7 +115,8 @@ shutdown_rooms(Host) ->
Rooms = mnesia:dirty_select(muc_online_room,
[{#muc_online_room{name_host = '$1',
pid = '$2'},
[{'==', {element, 2, '$1'}, MyHost}],
[{'==', {element, 2, '$1'}, MyHost},
{'==', {node, '$2'}, node()}],
['$2']}]),
[Pid ! shutdown || Pid <- Rooms],
Rooms.