aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers/common/inet_drv.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-06-08 14:41:24 +0200
committerRickard Green <[email protected]>2017-06-08 14:41:24 +0200
commit94379b22116ec5d1efd56a0ace837054b3da6fa2 (patch)
tree505a13ccadad53d80ac8fba058be6f79916dcc71 /erts/emulator/drivers/common/inet_drv.c
parentb85e77fb68add53eefa8aaa89a1e6f923fda9565 (diff)
parentb1f76e2f15c9d8c741ecb4bddc0b38740f3e7143 (diff)
downloadotp-94379b22116ec5d1efd56a0ace837054b3da6fa2.tar.gz
otp-94379b22116ec5d1efd56a0ace837054b3da6fa2.tar.bz2
otp-94379b22116ec5d1efd56a0ace837054b3da6fa2.zip
Merge branch 'maint-19' into maint
* maint-19: Updated OTP version Update release notes Update version numbers erts: Fix so that 81b628 (sigterm=kill) works Updated OTP version Prepare release Update testcase to check that purge handle hibernated process correct Do not GC hibernated process from other processes Fix check_process_code() on hibernated process Unconditionally clear IO buffers on send/shutdown errors
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 1885338ce5..ebd13e6f05 100644
--- a/erts/emulator/drivers/common/inet_drv.c
+++ b/erts/emulator/drivers/common/inet_drv.c
@@ -10386,6 +10386,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
@@ -10408,8 +10411,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));