Closed cavoixanh closed 3 years ago
I checked, in new call :
It didn't call "if inside" :
func onConnectionStateChange(_ transport: Transport!, connectionState: String!) { if parent.isEndCall && !transport.isClosed() { self.parent.sendTransport?.close() self.parent.sendTransport?.dispose() self.parent.sendTransport = nil }
}`
So, can't be closed here
Issue related DispatchSemaphore, Maybe @ethand91 should make a complete sample ( make call many times, to many rooms for testing). Thank you.
Hi,
I am having an issue, please help.
In first call, all are normal. When end call, I called function:
`func onConnectionStateChange(_ transport: Transport!, connectionState: String!) { if parent.isEndCall && !transport.isClosed() { self.parent.sendTransport?.close() self.parent.sendTransport?.dispose() self.parent.sendTransport = nil }
}`
In new call, I initialized:
self.sendTransport = self.device.createSendTransport(self.sendTransportHandler!.delegate!, id: id, iceParameters: iceParameters.description, iceCandidates: iceCandidatesArray.description, dtlsParameters: dtlsParameters.description)
In here, I printed:
self.sendTransport!.isClosed()
and it is false (not close). But after that, it change to true(closed) soon. So I get crash atlet kindProducer: Producer = self.sendTransport!.produce(self.producerHandler!.delegate!, track: track, encodings: encodings, codecOptions: codecOptions)
If I didn't call these lines when end call at first video call, this issues will be not happen.
self.parent.sendTransport?.close() self.parent.sendTransport?.dispose() self.parent.sendTransport = nil
crash log
Terminating app due to uncaught exception 'RuntimeException', reason: 'SendTransport closed' terminating with uncaught exception of type NSException 2021-01-18 18:09:01.647078+0700 [644:135559] Terminating app due to uncaught exception 'RuntimeException', reason: 'SendTransport closed' *** First throw call stack: (0x183310ec4 0x1824e1a40 0x107146ef0 0x1024b1de0 0x1024b15e4 0x102521038 0x102520ba8 0x102520990 0x10251d7a8 0x10251d4dc 0x10251d50c 0x18327f94c 0x18327f918 0x18327ee08 0x18327eab4 0x1831f6c90 0x18327e540 0x1024b6e0c 0x1024e3b88 0x1024a808c 0x10955b824 0x10955cdc8 0x10956aa78 0x1832a0df4 0x18329bcbc 0x18329b1f0 0x185514584 0x1b04a6bc0 0x1094cd468 0x102536be4 0x102536b5c 0x102536c28 0x182d5abb4) libc++abi.dylib: terminating with uncaught exception of type NSException