mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +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,
|
Mech,
|
||||||
ClientIn) of
|
ClientIn) of
|
||||||
{ok, Props} ->
|
{ok, Props} ->
|
||||||
(StateData#state.sockmod):reset_stream(
|
catch (StateData#state.sockmod):reset_stream(
|
||||||
StateData#state.socket),
|
StateData#state.socket),
|
||||||
send_element(StateData, exmpp_server_sasl:success()),
|
send_element(StateData, exmpp_server_sasl:success()),
|
||||||
U = proplists:get_value(username, Props),
|
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,
|
case cyrsasl:server_step(StateData#state.sasl_state,
|
||||||
ClientIn) of
|
ClientIn) of
|
||||||
{ok, Props} ->
|
{ok, Props} ->
|
||||||
(StateData#state.sockmod):reset_stream(
|
catch (StateData#state.sockmod):reset_stream(
|
||||||
StateData#state.socket),
|
StateData#state.socket),
|
||||||
send_element(StateData, exmpp_server_sasl:success()),
|
send_element(StateData, exmpp_server_sasl:success()),
|
||||||
U = proplists:get_value(username, Props),
|
U = proplists:get_value(username, Props),
|
||||||
|
Loading…
Reference in New Issue
Block a user