diff options
author | Peter Andersson <[email protected]> | 2015-03-06 12:19:26 +0100 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2015-03-06 12:19:26 +0100 |
commit | 50305916505a062e9690ddcb0911fb9823d951c4 (patch) | |
tree | 3bc0b80f592c35dc56251dce96982000eb3d2684 /lib/common_test/src | |
parent | 667bdfbba88c86b8b52cd7e33275d7a8cd63b403 (diff) | |
parent | 6b635b516a6721d5b6a7b08e501004857175a183 (diff) | |
download | otp-50305916505a062e9690ddcb0911fb9823d951c4.tar.gz otp-50305916505a062e9690ddcb0911fb9823d951c4.tar.bz2 otp-50305916505a062e9690ddcb0911fb9823d951c4.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/common_test/src')
-rw-r--r-- | lib/common_test/src/ct_telnet.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/common_test/src/ct_telnet.erl b/lib/common_test/src/ct_telnet.erl index babe73e575..4e03bf8630 100644 --- a/lib/common_test/src/ct_telnet.erl +++ b/lib/common_test/src/ct_telnet.erl @@ -1122,7 +1122,8 @@ teln_expect1(Name,Pid,Data,Pattern,Acc,EO=#eo{idle_timeout=IdleTO, NotFinished -> %% Get more data Fun = fun() -> get_data1(EO#eo.teln_pid) end, - case timer:tc(ct_gen_conn, do_within_time, [Fun, IdleTO]) of + BreakAfter = if TotalTO < IdleTO -> TotalTO; true -> IdleTO end, + case timer:tc(ct_gen_conn, do_within_time, [Fun, BreakAfter]) of {_,{error,Reason}} -> %% A timeout will occur when the telnet connection %% is idle for EO#eo.idle_timeout milliseconds. |