belle-sip icon indicating copy to clipboard operation
belle-sip copied to clipboard

Hangs Windows app with too many concurrent sockets

Open attermann opened this issue 4 years ago • 1 comments

Using belle-sip (c8a82ea) in linphone-desktop to make a series of parallel HTTP requests results in the Windows app hanging and the following error being logged several times per millisecond:

[/belle-sip] ERROR WaitForMultipleObjectsEx() failed.

I traced this back to belle-sip not honoring MAXIMUM_WAIT_OBJECTS when calling WaitForMultipleObjectsEx. I was able to circumvent this issue by limiting the number of descriptors added in belle_sip_main_loop_iterate before calling belle_sip_poll, but without detailed knowledge of belle-sip internals, I don't know if this is the correct solution.

attermann avatar Jun 30 '21 18:06 attermann

Created pull request https://github.com/BelledonneCommunications/belle-sip/pull/16 to illustrate my temporary fix.

attermann avatar Jun 30 '21 22:06 attermann