diff options
author | Micael Karlberg <[email protected]> | 2019-03-27 12:59:04 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-04-17 16:56:33 +0200 |
commit | de49a641d635b2b0c494e64f78069049ab56cd5e (patch) | |
tree | 0da3307ee5bcfffa8c1b6952c0845a21be53adb7 /erts/emulator/nifs/common/socket_nif.c | |
parent | dbe9bbfb801bcd92cc54c73ce96203b3a04c5517 (diff) | |
download | otp-de49a641d635b2b0c494e64f78069049ab56cd5e.tar.gz otp-de49a641d635b2b0c494e64f78069049ab56cd5e.tar.bz2 otp-de49a641d635b2b0c494e64f78069049ab56cd5e.zip |
[esock] Fixed socket close race
Used ref from wrong environment when building reply.
Diffstat (limited to 'erts/emulator/nifs/common/socket_nif.c')
-rw-r--r-- | erts/emulator/nifs/common/socket_nif.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/nifs/common/socket_nif.c b/erts/emulator/nifs/common/socket_nif.c index 870ab63bdf..b06b93236d 100644 --- a/erts/emulator/nifs/common/socket_nif.c +++ b/erts/emulator/nifs/common/socket_nif.c @@ -6600,7 +6600,7 @@ ERL_NIF_TERM nclose(ErlNifEnv* env, ("SOCKET", "nclose -> [%d] stop was scheduled\r\n", descP->sock) ); dec_socket(domain, type, protocol); // SHALL WE DO THIS AT finalize? - reply = esock_make_ok2(env, descP->closeRef); + reply = esock_make_ok2(env, enif_make_copy(env, descP->closeRef)); } else { SSDBG( descP, |