From 0098eed847516cc6760d961421c83527816e35ae Mon Sep 17 00:00:00 2001
From: Rory Byrne
Date: Sat, 2 May 2015 20:34:24 +0100
Subject: Apply 'show_econnreset' socket option to send errors as well
Up till now all send errors have been translated into a generic
{error, closed}. This patch allows {error, econnreset} to be
returned on send errors when it is detected that the TCP peer
has sent an RST.
---
lib/kernel/doc/src/inet.xml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
(limited to 'lib/kernel/doc/src')
diff --git a/lib/kernel/doc/src/inet.xml b/lib/kernel/doc/src/inet.xml
index a364f9e0c9..4dd9e0e221 100644
--- a/lib/kernel/doc/src/inet.xml
+++ b/lib/kernel/doc/src/inet.xml
@@ -1056,7 +1056,10 @@ setcap cap_sys_admin,cap_sys_ptrace,cap_dac_read_search+epi beam.smp
active mode, the controlling process will receive a
{tcp_error, Socket, econnreset} message
before the usual {tcp_closed, Socket}, as is
- the case for any other socket error.
+ the case for any other socket error. Calls to
+ gen_tcp:send/2
+ will also return {error, econnreset} when it
+ is detected that a TCP peer has sent an RST.
A connected socket returned from
gen_tcp:accept/1
will inherit the show_econnreset setting from the
--
cgit v1.2.3