File 1130-TLS-distribution-shut-down-accept-process-cleanly.patch of Package erlang
From 2ebbcbc23fdb7856ee46316bb35067c755838012 Mon Sep 17 00:00:00 2001
From: Magnus Henoch <magnus@erlang-solutions.com>
Date: Mon, 8 Feb 2016 17:56:37 +0000
Subject: [PATCH] TLS distribution: shut down accept process cleanly
In ssl_tls_dist_proxy:accept_loop/3, handle {error, closed} by
exiting normally. This prevents a spurious error report at node
shutdown.
---
lib/ssl/src/ssl_tls_dist_proxy.erl | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/ssl/src/ssl_tls_dist_proxy.erl b/lib/ssl/src/ssl_tls_dist_proxy.erl
index 4c78979..8a39bde 100644
--- a/lib/ssl/src/ssl_tls_dist_proxy.erl
+++ b/lib/ssl/src/ssl_tls_dist_proxy.erl
@@ -195,6 +195,11 @@ accept_loop(Proxy, erts = Type, Listen, Extra) ->
{_Kernel, unsupported_protocol} ->
exit(unsupported_protocol)
end;
+ {error, closed} ->
+ %% The listening socket is closed: the proxy process is
+ %% shutting down. Exit normally, to avoid generating a
+ %% spurious error report.
+ exit(normal);
Error ->
exit(Error)
end,
--
2.1.4