diff options
author | Sverker Eriksson <[email protected]> | 2017-09-08 17:11:20 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-11-15 20:10:33 +0100 |
commit | 9271fd39c48a121b6be79e7a44a524c883fafc41 (patch) | |
tree | f141be4ce38f1a198a4e076262ae8469ca61014b /erts/emulator/beam/bif.c | |
parent | 389e11b8b8a476ca73ca03a39ad7ec298dc99e83 (diff) | |
download | otp-9271fd39c48a121b6be79e7a44a524c883fafc41.tar.gz otp-9271fd39c48a121b6be79e7a44a524c883fafc41.tar.bz2 otp-9271fd39c48a121b6be79e7a44a524c883fafc41.zip |
erts: Let send(_,_,[noconnect]) enqueue msg on pending connection.
The least bad behavior I think:
* We cannot return 'noconnect' as caller might already have enqueued
monitor/link that never triggers.
* We cannot block waiting for connection as that can ruin latency
when 'noconnect' is used to avoid blocking auto-connect
(see gen_server and gen_statem).
But there might be users getting more cases of bad latency
waiting for a pendig connection, instead of a fast 'noconnect'.
Diffstat (limited to 'erts/emulator/beam/bif.c')
-rw-r--r-- | erts/emulator/beam/bif.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c index 8eb4d9e85b..30278cbe36 100644 --- a/erts/emulator/beam/bif.c +++ b/erts/emulator/beam/bif.c @@ -2192,11 +2192,10 @@ do_send(Process *p, Eterm to, Eterm msg, Eterm *refp, ErtsSendContext *ctx) if (is_not_atom(tp[1]) || is_not_atom(tp[2])) return SEND_BADARG; - /* sysname_to_connected_dist_entry will return NULL if there - is no dist_entry or the dist_entry has no port, + /* erts_find_dist_entry will return NULL if there is no dist_entry but remote_send() will handle that. */ - dep = erts_sysname_to_connected_dist_entry(tp[2]); + dep = erts_find_dist_entry(tp[2]); if (dep == erts_this_dist_entry) { Eterm id; |