hibernate

This commit is contained in:
Feng 2016-03-22 18:14:13 +08:00
parent 4cee1ad07e
commit fffbd3dd1e
2 changed files with 2 additions and 2 deletions

View File

@ -139,7 +139,7 @@ handle_cast(Msg, State) ->
handle_info(heartbeat, State) -> handle_info(heartbeat, State) ->
publish(uptime, list_to_binary(uptime(State))), publish(uptime, list_to_binary(uptime(State))),
publish(datetime, list_to_binary(datetime())), publish(datetime, list_to_binary(datetime())),
{noreply, State}; {noreply, State, hibernate};
handle_info(tick, State) -> handle_info(tick, State) ->
retain(brokers), retain(brokers),

View File

@ -127,7 +127,7 @@ handle_info({monitor, SusPid, busy_dist_port, Port}, State) ->
end, State); end, State);
handle_info(reset, State) -> handle_info(reset, State) ->
{noreply, State#state{events = []}}; {noreply, State#state{events = []}, hibernate};
handle_info(Info, State) -> handle_info(Info, State) ->
?UNEXPECTED_INFO(Info, State). ?UNEXPECTED_INFO(Info, State).