diff options
author | Evgeny Khramtsov <ekhramtsov@process-one.net> | 2019-07-12 11:55:36 +0300 |
---|---|---|
committer | Evgeny Khramtsov <ekhramtsov@process-one.net> | 2019-07-12 11:55:36 +0300 |
commit | 6f5d99275b2c41738647dd46659ad5fd0a424827 (patch) | |
tree | 55d12cb3d244e4363dfb2f80df1d09bb98269d40 /src/mod_bosh_redis.erl | |
parent | Improve previous commit (diff) |
Process unexpected messages uniformly
Diffstat (limited to '')
-rw-r--r-- | src/mod_bosh_redis.erl | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mod_bosh_redis.erl b/src/mod_bosh_redis.erl index c1840604..a55fbdf0 100644 --- a/src/mod_bosh_redis.erl +++ b/src/mod_bosh_redis.erl @@ -1,7 +1,7 @@ %%%---------------------------------------------------------------------- %%% File : mod_bosh_redis.erl %%% Author : Evgeny Khramtsov <ekhramtsov@process-one.net> -%%% Purpose : +%%% Purpose : %%% Created : 28 Mar 2017 by Evgeny Khramtsov <ekhramtsov@process-one.net> %%% %%% @@ -107,18 +107,19 @@ init([]) -> clean_table(), {ok, #state{}}. -handle_call(_Request, _From, State) -> - Reply = ok, - {reply, Reply, State}. +handle_call(Request, From, State) -> + ?WARNING_MSG("Unexpected call from ~p: ~p", [From, Request]), + {noreply, State}. -handle_cast(_Msg, State) -> +handle_cast(Msg, State) -> + ?WARNING_MSG("Unexpected cast: ~p", [Msg]), {noreply, State}. handle_info({redis_message, ?BOSH_KEY, SID}, State) -> ets_cache:delete(?BOSH_CACHE, SID), {noreply, State}; handle_info(Info, State) -> - ?ERROR_MSG("Unexpected info: ~p", [Info]), + ?WARNING_MSG("Unexpected info: ~p", [Info]), {noreply, State}. terminate(_Reason, _State) -> |