Opened 14 years ago
Closed 14 years ago
#1225 closed defect (fixed)
iPhone: UDP socket send error after waking up from background mode (thanks Joe Meade for the report)
Reported by: | bennylp | Owned by: | bennylp |
---|---|---|---|
Priority: | normal | Milestone: | release-1.10 |
Component: | pjlib | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: |
Description
UDP sockets are reset by iOS when the app goes into background mode. PJLIB handles this by detecting the error when receive event is set and recreating the sockets accordingly. This feature was added by ticket #1107.
Unfortunately sometimes it's the sending operation that comes first after the app is woken up, and since the UDP socket is in a bad state, this will cause the sending operation to fail. This will cause errors similar to these:
17:35:40.120 stuntsx0x9de55 STUN error sending message: Broken pipe 17:35:40.120 stuntp0x33b920 Error sending STUN request: Broken pipe 17:35:40.121 stuntp0x33b920 Session failed because STUN Binding request failed: Broken pipe 17:35:40.121 icetp00 STUN binding request failed: Broken pipe 17:35:40.121 stuntsx0xa17b5 STUN error sending message: Broken pipe 17:35:40.122 stuntp0x33af00 Error sending STUN request: Broken pipe 17:35:40.122 stuntp0x33af00 Session failed because STUN Binding request failed: Broken pipe
This ticket will fix the sending error by recreating the UDP sockets if the sending operation fails after waking up from background mode.
Change History (1)
comment:1 Changed 14 years ago by bennylp
- Resolution set to fixed
- Status changed from new to closed
(In [3491]) Fixed #1225: iPhone: UDP socket send error after waking up from background mode (thanks Joe Meade for the report)