aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2019-03-22 13:31:49 +0100
committerLukas Larsson <[email protected]>2019-03-25 16:34:11 +0100
commit9426d0cbb790b50ad5afcf348bb24e73e6b7b2da (patch)
tree9badb1019e98cc14b2421e00714252a1ab491354
parent87c2fb2e0b1d376a367a4066703db342faadd6d5 (diff)
downloadotp-9426d0cbb790b50ad5afcf348bb24e73e6b7b2da.tar.gz
otp-9426d0cbb790b50ad5afcf348bb24e73e6b7b2da.tar.bz2
otp-9426d0cbb790b50ad5afcf348bb24e73e6b7b2da.zip
erts: Adjust dist obuf size correctly after hdr fin
-rw-r--r--erts/emulator/beam/dist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
index 8669cc16c9..faed10ff91 100644
--- a/erts/emulator/beam/dist.c
+++ b/erts/emulator/beam/dist.c
@@ -2885,7 +2885,9 @@ erts_dist_command(Port *prt, int initial_reds)
ob = oq.first;
ASSERT(ob);
do {
+ obufsize += size_obuf(ob);
reds = erts_encode_ext_dist_header_finalize(ob, dep, flags, reds);
+ obufsize -= size_obuf(ob);
if (reds < 0)
break;
last_finalized = ob;
@@ -2924,7 +2926,9 @@ erts_dist_command(Port *prt, int initial_reds)
while (oq.first && !preempt) {
ErtsDistOutputBuf *fob;
Uint size;
+ obufsize += size_obuf(oq.first);
reds = erts_encode_ext_dist_header_finalize(oq.first, dep, flags, reds);
+ obufsize -= size_obuf(oq.first);
if (reds < 0) {
preempt = 1;
break;