mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +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,7 +593,7 @@ wait_for_feature_request({xmlstreamelement, #xmlel{ns = NS, name = Name} = El},
|
||||
Mech,
|
||||
ClientIn) of
|
||||
{ok, Props} ->
|
||||
(StateData#state.sockmod):reset_stream(
|
||||
catch (StateData#state.sockmod):reset_stream(
|
||||
StateData#state.socket),
|
||||
send_element(StateData, exmpp_server_sasl:success()),
|
||||
U = proplists:get_value(username, Props),
|
||||
@ -712,7 +712,7 @@ 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(
|
||||
catch (StateData#state.sockmod):reset_stream(
|
||||
StateData#state.socket),
|
||||
send_element(StateData, exmpp_server_sasl:success()),
|
||||
U = proplists:get_value(username, Props),
|
||||
|
Loading…
Reference in New Issue
Block a user