aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-09-20 14:16:14 +0200
committerSverker Eriksson <[email protected]>2017-09-20 14:16:14 +0200
commit3aaeab5fb7a259aaec66126d5d50231269e32961 (patch)
treef7eb45483e3ae5cd9b0e4a9b886c85c50cce2196 /erts
parenta3c983b4ba8755e39083bdaa785e400e8b5d745c (diff)
downloadotp-3aaeab5fb7a259aaec66126d5d50231269e32961.tar.gz
otp-3aaeab5fb7a259aaec66126d5d50231269e32961.tar.bz2
otp-3aaeab5fb7a259aaec66126d5d50231269e32961.zip
erts: Improve distribution send operations
by ignoring reply earlier.
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/drivers/common/inet_drv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c
index 7b1f4a0e9c..554c48059f 100644
--- a/erts/emulator/drivers/common/inet_drv.c
+++ b/erts/emulator/drivers/common/inet_drv.c
@@ -2199,13 +2199,16 @@ static int inet_reply_ok(inet_descriptor* desc)
ErlDrvTermData caller = desc->caller;
int i = 0;
+ desc->caller = 0;
+ if (is_not_internal_pid(caller))
+ return 0;
+
i = LOAD_ATOM(spec, i, am_inet_reply);
i = LOAD_PORT(spec, i, desc->dport);
i = LOAD_ATOM(spec, i, am_ok);
i = LOAD_TUPLE(spec, i, 3);
ASSERT(i == sizeof(spec)/sizeof(*spec));
- desc->caller = 0;
return erl_drv_send_term(desc->dport, caller, spec, i);
}