mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Cache negative response (EJAB-474)
SVN Revision: 1294
This commit is contained in:
parent
7c64509c46
commit
d46b7d5908
@ -1,3 +1,7 @@
|
||||
2008-04-14 Christophe Romain <christophe.romain@process-one.net>
|
||||
|
||||
* src/mod_caps.erl: Cache negative response (EJAB-474)
|
||||
|
||||
2008-04-12 Badlop <badlop@process-one.net>
|
||||
|
||||
* src/web/ejabberd_web_admin.erl: Include Last-Modified HTTP
|
||||
|
@ -250,8 +250,21 @@ handle_cast({disco_response, From, _To,
|
||||
?ERROR_MSG("ID '~s' matches no query", [ID])
|
||||
end;
|
||||
{error, _} ->
|
||||
gen_server:cast(self(), visit_feature_queries),
|
||||
?DEBUG("Error IQ reponse from ~s:~n~p", [jlib:jid_to_string(From), SubEls]);
|
||||
%% XXX: if we get error, we cache empty feature not to probe the client continuously
|
||||
case ?DICT:find(ID, Requests) of
|
||||
{ok, {Node, SubNode}} ->
|
||||
Features = [],
|
||||
mnesia:transaction(
|
||||
fun() ->
|
||||
mnesia:write(#caps_features{node_pair = {Node, SubNode},
|
||||
features = Features})
|
||||
end),
|
||||
gen_server:cast(self(), visit_feature_queries);
|
||||
error ->
|
||||
?ERROR_MSG("ID '~s' matches no query", [ID])
|
||||
end;
|
||||
%gen_server:cast(self(), visit_feature_queries),
|
||||
%?DEBUG("Error IQ reponse from ~s:~n~p", [jlib:jid_to_string(From), SubEls]);
|
||||
{result, _} ->
|
||||
?DEBUG("Invalid IQ contents from ~s:~n~p", [jlib:jid_to_string(From), SubEls]);
|
||||
_ ->
|
||||
|
Loading…
Reference in New Issue
Block a user