Opened 14 years ago
Last modified 14 years ago
#1130 closed defect
Incoming TCP connection on iPhone iOS4 BG mode would fail over and over with EAGAIN error (thanks Bogdan Krakowski for the report) — at Version 1
Reported by: | bennylp | Owned by: | bennylp |
---|---|---|---|
Priority: | normal | Milestone: | release-1.8.5 |
Component: | pjsip | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: |
Description (last modified by ming)
From accept() manual:
There may not always be a connection waiting after a SIGIO is delivered or select(2) or poll(2) return a readability event because the connection might have been removed by an asynchronous network error or another thread before accept() is called.
In iOS4, the problem is reproducible by putting the app to BG and locking the device, hence causing iOS4 to close all connections. When application is brought back to the FG, select() always returns a readability event while accept() always fails with EAGAIN error.
There was a report that the problem happened in other platforms as well (such as Sun Solaris).