aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2013-11-29 10:52:32 +0100
committerSiri Hansen <[email protected]>2013-11-29 10:52:32 +0100
commitd6b6c74de75357092649f31eb961154420461c15 (patch)
tree2eedadb94c9a9b5336a846127fbb65f5a7809390 /lib/common_test/src
parent3b6f02df56823a122ca12ca84eda52c436f78e44 (diff)
parent5987cd070b80a0e14905359149af6baeacd3d310 (diff)
downloadotp-d6b6c74de75357092649f31eb961154420461c15.tar.gz
otp-d6b6c74de75357092649f31eb961154420461c15.tar.bz2
otp-d6b6c74de75357092649f31eb961154420461c15.zip
Merge branch 'siri/ct_netconfc/close_session-timeout-hangs/OTP-11478' into maint
* siri/ct_netconfc/close_session-timeout-hangs/OTP-11478: [common_test] Don't hang netconf client when close-session times out
Diffstat (limited to 'lib/common_test/src')
-rw-r--r--lib/common_test/src/ct_netconfc.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/common_test/src/ct_netconfc.erl b/lib/common_test/src/ct_netconfc.erl
index 7f10e1db09..64fe8b4bb0 100644
--- a/lib/common_test/src/ct_netconfc.erl
+++ b/lib/common_test/src/ct_netconfc.erl
@@ -1129,10 +1129,14 @@ handle_msg({Ref,timeout},
ct_gen_conn:return(Caller,{error,{hello_session_failed,timeout}}),
{stop,State#state{hello_status={error,timeout}}};
handle_msg({Ref,timeout},#state{pending=Pending} = State) ->
- {value,#pending{caller=Caller},Pending1} =
+ {value,#pending{op=Op,caller=Caller},Pending1} =
lists:keytake(Ref,#pending.ref,Pending),
ct_gen_conn:return(Caller,{error,timeout}),
- {noreply,State#state{pending=Pending1}}.
+ R = case Op of
+ close_session -> stop;
+ _ -> noreply
+ end,
+ {R,State#state{pending=Pending1}}.
%% @private
%% Called by ct_util_server to close registered connections before terminate.