Skip to content

Conversation

@jdjennin
Copy link

@jdjennin jdjennin commented Aug 9, 2017

I added code and commented out a faulty assertion to handle a mysterious crash that resulted from disconnecting devices from a macOS client. I had several crash reports that share this backtrace, and I finally reproduced it while connected to Xcode and found that buffer_size == 0 and done == true when a device disconnects. We get into this block of code where assert(buffer_size == sizeof(ref_upacket.size)), and the macOS client crashes. This assertion doesn't seem necessary. If there's no data and no error and GCD says we're done, then this is really just a no-op, and we should just return from the block rather than crash.

@jdjennin
Copy link
Author

jdjennin commented Aug 9, 2017

Re: #34

@rsms rsms self-requested a review December 9, 2017 03:26
Copy link
Owner

@rsms rsms left a comment

Choose a reason for hiding this comment

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

This is awesome!
Could you adjust the indentation to match the existing source file please? (2 SPACEs) Makes the diff easier to read and makes the code fit in with the rest of the project.

miokato added a commit to miokato/peertalk that referenced this pull request Jan 30, 2021
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.

2 participants