aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-11-21 14:40:06 +0100
committerSverker Eriksson <[email protected]>2017-11-21 18:53:50 +0100
commita5aaba7c9a316327940d0b861dd300d59aa99209 (patch)
treedac8040b9b1cdb5d067ce38bd106372b1352c71c /erts
parentf3014f40a1e81e2f83c261e541ade39b7dcda24d (diff)
downloadotp-a5aaba7c9a316327940d0b861dd300d59aa99209.tar.gz
otp-a5aaba7c9a316327940d0b861dd300d59aa99209.tar.bz2
otp-a5aaba7c9a316327940d0b861dd300d59aa99209.zip
erts: Fix preemption bug in erts_dist_command
We should break out when out of reductions.
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/dist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
index 16a7bd9eb3..ee288dc0bd 100644
--- a/erts/emulator/beam/dist.c
+++ b/erts/emulator/beam/dist.c
@@ -2335,10 +2335,10 @@ erts_dist_command(Port *prt, int initial_reds)
ASSERT(ob);
do {
reds = erts_encode_ext_dist_header_finalize(ob, dep, flags, reds);
- if (reds >= 0) {
- last_finalized = ob;
- ob = ob->next;
- }
+ if (reds < 0)
+ break;
+ last_finalized = ob;
+ ob = ob->next;
} while (ob);
if (last_finalized) {
/*