fix issue #500
This commit is contained in:
parent
b257423730
commit
3733574105
|
@ -96,7 +96,9 @@ expire_messages(Time) when is_integer(Time) ->
|
||||||
when Time > (MegaSecs * 1000000 + Secs) -> Topic
|
when Time > (MegaSecs * 1000000 + Secs) -> Topic
|
||||||
end),
|
end),
|
||||||
Topics = mnesia:select(retained_message, Match, write),
|
Topics = mnesia:select(retained_message, Match, write),
|
||||||
lists:foreach(fun(Topic) -> mnesia:delete({retained_message, Topic}) end, Topics)
|
lists:foreach(fun(<<"$SYS/", _/binary>>) -> ok; %% ignore $SYS/# messages
|
||||||
|
(Topic) -> mnesia:delete({retained_message, Topic})
|
||||||
|
end, Topics)
|
||||||
end).
|
end).
|
||||||
|
|
||||||
-spec(retained_count() -> non_neg_integer()).
|
-spec(retained_count() -> non_neg_integer()).
|
||||||
|
|
Loading…
Reference in New Issue