aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2019-04-26 16:48:07 +0200
committerRaimo Niskanen <[email protected]>2019-05-06 12:18:17 +0200
commitb0018e78e6b87b40e93760bda715ae45f0776da7 (patch)
treeff3b6b8e5f351fa09cd8159212993e67874e5bb3 /erts
parent389d0749dfefb5c1e41b5e24403bdac4cfdc628d (diff)
downloadotp-b0018e78e6b87b40e93760bda715ae45f0776da7.tar.gz
otp-b0018e78e6b87b40e93760bda715ae45f0776da7.tar.bz2
otp-b0018e78e6b87b40e93760bda715ae45f0776da7.zip
Copy linger zero flag from listen socket
Diffstat (limited to 'erts')
-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 b71ce0389d..becc04950e 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);