Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for large payloads #14

Closed
wants to merge 2 commits into from
Closed

Conversation

netgfx
Copy link

@netgfx netgfx commented Nov 10, 2016

Applied a fix to handle payloads more than 32kb

Fixes issue #13

finalDataBuffer.append(responseData)
} else {
remainingLength = 0
print("error cannot read mqtt payload")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, instead of printing, we should call self.delegate?.mqttErrorOccurred(in: self) and let the delegate do the appropriate thing.

multiplier *= 128
if multiplier > 128*128*128 {
return
self.queue.sync {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I fail to understand why we need to dispatch the reading logic synchronously to a concurrent queue.

@pavithramh
Copy link

Hi,

After including code for larger payloads, app crashes with "terminating with uncaught exception of type NSException"

screen shot 2017-02-15 at 5 09 05 pm

@netgfx netgfx closed this Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants