A new user interface for you! Read more...

File 0295-inets-Improve-httpc-gracefulness.patch of Package erlang

From 16ae8f29bce19690bc3dfcb0838c402f150ee5c1 Mon Sep 17 00:00:00 2001
From: Ingela Anderton Andin <ingela@erlang.org>
Date: Thu, 26 Apr 2018 09:47:01 +0200
Subject: [PATCH] inets: Improve httpc gracefulness

This commit will make the close down sequence work as intended, and no
crash report will be generated. Alas such error corner cases are hard to
write automated test for.
---
 lib/inets/src/http_client/httpc_handler.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl
index eeb08ce0ee..c9763507d1 100644
--- a/lib/inets/src/http_client/httpc_handler.erl
+++ b/lib/inets/src/http_client/httpc_handler.erl
@@ -839,7 +839,7 @@ connect_and_send_first_request(Address, Request, #state{options = Options0} = St
                     self() ! {init_error, error_sending,
                               httpc_response:error(Request, Reason)},
                     {ok, State#state{request = Request,
-                                     session = #session{socket = Socket}}}
+                                     session = Session}}
             end;
         {error, Reason} ->
             self() ! {init_error, error_connecting,
-- 
2.16.3