aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers/common/inet_drv.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-06-08 14:48:27 +0200
committerRickard Green <[email protected]>2017-06-08 14:48:27 +0200
commit4b258844c4c0a9102d95cb03d7e1c4e58e147987 (patch)
treea10b561721475ee593b03c543b3cfd65b6b9a7e2 /erts/emulator/drivers/common/inet_drv.c
parenteefca18e8bed9f41ce65ae79fb1a5b614accbfde (diff)
parent94379b22116ec5d1efd56a0ace837054b3da6fa2 (diff)
downloadotp-4b258844c4c0a9102d95cb03d7e1c4e58e147987.tar.gz
otp-4b258844c4c0a9102d95cb03d7e1c4e58e147987.tar.bz2
otp-4b258844c4c0a9102d95cb03d7e1c4e58e147987.zip
Merge branch 'maint'
* maint: Updated OTP version Update release notes Update version numbers erts: Fix so that 81b628 (sigterm=kill) works Updated OTP version Prepare release Unconditionally clear IO buffers on send/shutdown errors Conflicts: OTP_VERSION erts/emulator/sys/unix/sys.c erts/vsn.mk
Diffstat (limited to 'erts/emulator/drivers/common/inet_drv.c')
-rw-r--r--erts/emulator/drivers/common/inet_drv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c
index bfebff5706..13ee935e45 100644
--- a/erts/emulator/drivers/common/inet_drv.c
+++ b/erts/emulator/drivers/common/inet_drv.c
@@ -10490,6 +10490,9 @@ static int tcp_send_or_shutdown_error(tcp_descriptor* desc, int err)
set_busy_port(desc->inet.port, 0);
}
+ tcp_clear_output(desc);
+ tcp_clear_input(desc);
+
/*
* We used to handle "expected errors" differently from unexpected ones.
* Now we handle all errors in the same way (unless the show_econnreset
@@ -10512,8 +10515,6 @@ static int tcp_send_or_shutdown_error(tcp_descriptor* desc, int err)
else
desc_close(INETP(desc));
} else {
- tcp_clear_output(desc);
- tcp_clear_input(desc);
tcp_close_check(desc);
erl_inet_close(INETP(desc));