diff options
author | John Högberg <[email protected]> | 2017-06-27 15:52:56 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2017-06-27 15:52:56 +0200 |
commit | 0dced656e6871e03a153bb99af10d8710ffca7d9 (patch) | |
tree | 6fee44d1d76d0b96a4c6f4e7bd104b69b60b316f /erts/emulator/drivers | |
parent | 798924ffd5efff77ba94ea7f54c2e69548d9d07e (diff) | |
parent | 8d9cde83b628533ae7a5fe85a5dd9c6c00c084e3 (diff) | |
download | otp-0dced656e6871e03a153bb99af10d8710ffca7d9.tar.gz otp-0dced656e6871e03a153bb99af10d8710ffca7d9.tar.bz2 otp-0dced656e6871e03a153bb99af10d8710ffca7d9.zip |
Merge branch 'maint-19' into maint
* maint-19:
Updated OTP version
Update release notes
Update version numbers
Fix statistics(wall_clock) and statistics(runtime) implementation
fixup! erts: Cleanup dropped port tasks correctly
erts: Add tests to detect port close race
Add a testcase for OTP-13939/ERL-193
erts: Cleanup dropped port tasks correctly
Mark socket disconnected on tcp_send_or_shutdown_error
Diffstat (limited to 'erts/emulator/drivers')
-rw-r--r-- | erts/emulator/drivers/common/inet_drv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c index 13ee935e45..fe421bfe12 100644 --- a/erts/emulator/drivers/common/inet_drv.c +++ b/erts/emulator/drivers/common/inet_drv.c @@ -4334,6 +4334,12 @@ static void desc_close(inet_descriptor* desc) desc->event = INVALID_EVENT; /* closed by stop_select callback */ desc->s = INVALID_SOCKET; desc->event_mask = 0; + + /* mark as disconnected in case when socket is left lingering due to + * {exit_on_close, false} option in gen_tcp socket creation. Next + * write to socket should produce {error, enotconn} and send a + * message {tcp_error,#Port<>,econnreset} */ + desc->state &= ~INET_STATE_CONNECTED; } } |