diff options
author | Péter Dimitrov <[email protected]> | 2018-02-06 10:17:19 +0100 |
---|---|---|
committer | Péter Dimitrov <[email protected]> | 2018-02-09 09:43:22 +0100 |
commit | 3b43a2fa050ac1b5f86a722bc556e74f6b44a3c9 (patch) | |
tree | e6afe7e25fada8ed8fe08065730b1e65a9bc1b2d /lib/inets/src | |
parent | 2e5063371ca21eeabd9c20462c16fac0ee147028 (diff) | |
download | otp-3b43a2fa050ac1b5f86a722bc556e74f6b44a3c9.tar.gz otp-3b43a2fa050ac1b5f86a722bc556e74f6b44a3c9.tar.bz2 otp-3b43a2fa050ac1b5f86a722bc556e74f6b44a3c9.zip |
inets: Fix httpc crash on keep-alive connections
- Set gen_server call timeout to infinity in httpc_handler.
- Add new testcase 'slow_connection'.
Change-Id: Id11b54c588e1d66b9ebba4da5dbfe5e9bee1f1ee
Diffstat (limited to 'lib/inets/src')
-rw-r--r-- | lib/inets/src/http_client/httpc_handler.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl index 1482f4f922..a4e406b807 100644 --- a/lib/inets/src/http_client/httpc_handler.erl +++ b/lib/inets/src/http_client/httpc_handler.erl @@ -711,9 +711,9 @@ do_handle_info({'EXIT', _, _}, State = #state{request = undefined}) -> %% can retry requests in the pipeline. do_handle_info({'EXIT', _, _}, State) -> {noreply, State#state{status = close}}. - + call(Msg, Pid) -> - try gen_server:call(Pid, Msg) + try gen_server:call(Pid, Msg, infinity) catch exit:{noproc, _} -> {error, closed}; |