mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Added catches to reset_stream calls to avoid errors during a race condition (thanks to Aleksey Shchepin)
This commit is contained in:
parent
81d364a97a
commit
de6675a433
@ -593,8 +593,8 @@ wait_for_feature_request({xmlstreamelement, #xmlel{ns = NS, name = Name} = El},
|
||||
Mech,
|
||||
ClientIn) of
|
||||
{ok, Props} ->
|
||||
(StateData#state.sockmod):reset_stream(
|
||||
StateData#state.socket),
|
||||
catch (StateData#state.sockmod):reset_stream(
|
||||
StateData#state.socket),
|
||||
send_element(StateData, exmpp_server_sasl:success()),
|
||||
U = proplists:get_value(username, Props),
|
||||
AuthModule = proplists:get_value(auth_module, Props),
|
||||
@ -712,8 +712,8 @@ wait_for_sasl_response({xmlstreamelement, #xmlel{ns = NS, name = Name} = El},
|
||||
case cyrsasl:server_step(StateData#state.sasl_state,
|
||||
ClientIn) of
|
||||
{ok, Props} ->
|
||||
(StateData#state.sockmod):reset_stream(
|
||||
StateData#state.socket),
|
||||
catch (StateData#state.sockmod):reset_stream(
|
||||
StateData#state.socket),
|
||||
send_element(StateData, exmpp_server_sasl:success()),
|
||||
U = proplists:get_value(username, Props),
|
||||
AuthModule = proplists:get_value(auth_module, Props),
|
||||
|
Loading…
Reference in New Issue
Block a user