ARTEMIS-2706 Discounting Transfer payload size

This commit is contained in:
Clebert Suconic 2020-04-14 16:56:52 -04:00
parent 17d659052d
commit e7a437d999
1 changed files with 2 additions and 1 deletions

View File

@ -838,7 +838,8 @@ public class ProtonServerSenderContext extends ProtonInitializable implements Pr
}
void deliver() {
int frameSize = protonSession.session.getConnection().getTransport().getOutboundFrameSizeLimit();
// This is discounting some bytes due to Transfer payload
int frameSize = protonSession.session.getConnection().getTransport().getOutboundFrameSizeLimit() - 50 - (delivery.getTag() != null ? delivery.getTag().length : 0);
// Let the Message decide how to present the message bytes
LargeBodyReader context = message.getLargeBodyReader();