Skip to content

Receive Transport Crash on second call #20

Open
@lets-swapcode

Description

@lets-swapcode

PS - Tried almost everything. Checked discourse group as well.

Case - First time everything works fine, able to leave the call as well BUT when trying to join again then its crashes in the beginning with below error

Screenshot 2023-09-11 at 2 47 28 PM

On leave -

  1. Attempt 1 - Tried setting to nil to all the property (consumer, producer, track, media, device close and nil) and socket disconnect
  2. Attempt 2 - Only socket disconnect
  3. Attempt 3 - consumer close, sent pause consumer socket and socket disconnect

What is the correct way to do this?

Transport callback handling
`
func onConnectionStateChange(transport: Transport, connectionState: TransportConnectionState) {
LOG.debug("Transport- Reconnect- (transport.id == sendTransport?.id ? "send" : "receive") onConnectionStateChange == (connectionState)")

    qJMMediaBGQueue.async {
        if connectionState == .disconnected && self.isCallEnded{
            LOG.error("Transport- End- transport closed")
            transport.close()
            return
        }
        
        if connectionState == .closed && transport.id == self.sendTransport?.id{
            LOG.error("Transport- End- transport sent closed - stop capture")
            self.videoCapture?.stopCapture()
        }
    }

`

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