aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2019-06-12 14:18:32 +0200
committerRaimo Niskanen <[email protected]>2019-06-12 14:18:32 +0200
commita5d80667f781eae20ac8224a054c9bdb7be9b83a (patch)
treee5ffcba310f2f9b522753f14a8e59a2dbc36ff04 /erts/emulator
parentcdc4d654777256790b277d24c709dd7e3831c451 (diff)
parentb0018e78e6b87b40e93760bda715ae45f0776da7 (diff)
downloadotp-a5d80667f781eae20ac8224a054c9bdb7be9b83a.tar.gz
otp-a5d80667f781eae20ac8224a054c9bdb7be9b83a.tar.bz2
otp-a5d80667f781eae20ac8224a054c9bdb7be9b83a.zip
Merge branch 'raimo/incomplete-socket-close/ERIERL-353/OTP-15370' into maint
* raimo/incomplete-socket-close/ERIERL-353/OTP-15370: Copy linger zero flag from listen socket Test linger zero flag from listen socket
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/drivers/common/inet_drv.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c
index c93966d24f..0d9b4ff59f 100644
--- a/erts/emulator/drivers/common/inet_drv.c
+++ b/erts/emulator/drivers/common/inet_drv.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1997-2018. All Rights Reserved.
+ * Copyright Ericsson AB 1997-2019. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -9846,10 +9846,8 @@ static tcp_descriptor* tcp_inet_copy(tcp_descriptor* desc,SOCKET s,
copy_desc->send_timeout = desc->send_timeout;
copy_desc->send_timeout_close = desc->send_timeout_close;
- if (desc->tcp_add_flags & TCP_ADDF_SHOW_ECONNRESET)
- copy_desc->tcp_add_flags |= TCP_ADDF_SHOW_ECONNRESET;
- else
- copy_desc->tcp_add_flags &= ~TCP_ADDF_SHOW_ECONNRESET;
+ copy_desc->tcp_add_flags = desc->tcp_add_flags
+ & (TCP_ADDF_SHOW_ECONNRESET | TCP_ADDF_LINGER_ZERO);
/* The new port will be linked and connected to the original caller */
port = driver_create_port(port, owner, "tcp_inet", (ErlDrvData) copy_desc);