Skip to content

Multiple Socket CPU high #678

@ruban22

Description

@ruban22

In an incoming call scenario, when the iOS app in background or in locked screen mode, we are getting the initial PushKit notification ( the ghost call) and in between getting the real call, the Sofia stack is creating multiple sockets which are left dangling and we have 200% CPU usage and then crash which seem to user like call has terminated.

In a very simplified form this is what is happening

  1. PushKit comes.
  2. Stack tries to make socket to the non-existent call
  3. Application via stack tells server “I’m here send me SDP”
  4. Stack makes new socket every 500ms until SDP comes from server - this could be 5 seconds (or more) so we have ten sockets open
  5. We get the SDP and make a proper socket connection. We now have one socket that is doing a call and the rest are still there doing their socket things chewing up CPU.

Appreciate how we can handle this when we get incoming call on IOS via PushKit?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions