diff options
author | Paul Guyot <[email protected]> | 2012-01-29 14:39:12 +0100 |
---|---|---|
committer | Paul Guyot <[email protected]> | 2012-01-29 14:39:12 +0100 |
commit | b37d0448db27aeaa364c7e2cd2017ed0596aa288 (patch) | |
tree | 4e9109de7aac8f9ec3f219c4fe04be0bcd8d9273 /lib/ssl/src | |
parent | f9ca630a95e1e2adb1b225bfb69e3101678183f3 (diff) | |
download | otp-b37d0448db27aeaa364c7e2cd2017ed0596aa288.tar.gz otp-b37d0448db27aeaa364c7e2cd2017ed0596aa288.tar.bz2 otp-b37d0448db27aeaa364c7e2cd2017ed0596aa288.zip |
Fix setup loop of SSL TLS dist proxy
The proxy socket or the SSL socket can be closed during the setup phase.
In such situations, the proxy processes must exit nicely, to avoid any
leak of processes waiting forever for data from closed sockets.
Diffstat (limited to 'lib/ssl/src')
-rw-r--r-- | lib/ssl/src/ssl_tls_dist_proxy.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ssl/src/ssl_tls_dist_proxy.erl b/lib/ssl/src/ssl_tls_dist_proxy.erl index d63eada571..61fabeb916 100644 --- a/lib/ssl/src/ssl_tls_dist_proxy.erl +++ b/lib/ssl/src/ssl_tls_dist_proxy.erl @@ -223,7 +223,11 @@ loop_conn_setup(World, Erts) -> loop_conn_setup(World, Erts); {tcp, Erts, Data} -> ssl:send(World, Data), - loop_conn_setup(World, Erts) + loop_conn_setup(World, Erts); + {tcp_closed, Erts} -> + ssl:close(World); + {ssl_closed, World} -> + gen_tcp:close(Erts) end. loop_conn(World, Erts) -> |