Merge pull request #476 from boimart1/bugfix/handle_zero_max_frame

Handle max-frame=0 correctly
This commit is contained in:
Emiel Bruijntjes 2022-09-11 20:19:36 +02:00 committed by GitHub
commit 7142d45363
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -389,7 +389,7 @@ bool ConnectionImpl::send(const Frame &frame)
// if the frame is bigger than we allow on the connection // if the frame is bigger than we allow on the connection
// it is impossible to send out this frame successfully // it is impossible to send out this frame successfully
if (frame.totalSize() > _maxFrame) return false; if (_maxFrame > 0 && frame.totalSize() > _maxFrame) return false;
// are we still setting up the connection? // are we still setting up the connection?
if ((_state == state_connected && _queue.empty()) || frame.partOfHandshake()) if ((_state == state_connected && _queue.empty()) || frame.partOfHandshake())