Network library - sample + documentation problems.
Originator: | miguel.de.icaza | ||
Number: | rdar://42249793 | Date Originated: | July 16, 2018 |
Status: | open | Resolved: | |
Product: | Sample Code | Product Version: | Xcode 10 beta 3 |
Classification: | Reproducible: | yes |
Summary: Sample code for Network does not cover error conditions raised by the Network stack that are not described on the header files or documentation. Steps to Reproduce: Build and run the nwcat program, and run with the following arguments: nwcat -t -v www.howsmyssl.com 44 Then wait, the server will close the connection. The sample rather than exiting stays in a loop processing events. The reason is that "is_complete" is set to true, but the documentation on the sample and header files expect "nw_content_context_t context" to be not null, and the is_final property on the "NWContentContext" to be true, which is not the case. Expected Results: The app should terminate on its own, and not burn 100% CPU Actual Results: Burns 100% CPU, stuck in a loop. Version/Build: Xcode10 beta 3 Configuration: Comments
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!