diff --git a/TelnyxRTC.podspec b/TelnyxRTC.podspec index 6e951533..d8bbab95 100644 --- a/TelnyxRTC.podspec +++ b/TelnyxRTC.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |spec| spec.name = "TelnyxRTC" - spec.version = "0.1.15" + spec.version = "0.1.17" spec.summary = "Enable Telnyx real-time communication services on iOS." spec.description = "The Telnyx iOS WebRTC Client SDK provides all the functionality you need to start making voice calls from an iPhone." spec.homepage = "https://github.com/team-telnyx/telnyx-webrtc-ios" diff --git a/TelnyxRTC/Telnyx/Models/TxError.swift b/TelnyxRTC/Telnyx/Models/TxError.swift index 25dda802..8d2400d8 100644 --- a/TelnyxRTC/Telnyx/Models/TxError.swift +++ b/TelnyxRTC/Telnyx/Models/TxError.swift @@ -17,7 +17,7 @@ public enum TxError : Error { /// Socket is not connected. Check that you have an active connection. case socketNotConnected /// Socket connection was cancelled. - case socketCancelled + case socketCancelled(nativeError:Error) } /// The underlying reason of client setup configuration errors @@ -131,8 +131,8 @@ extension TxError.SocketFailureReason: LocalizedError { switch self { case .socketNotConnected: return "Socket connection cancelled." - case .socketCancelled: - return "Socket is not connected, check that you have called .connect() first." + case let .socketCancelled(nativeError): + return "Socket is connection is cancelled, try calling .connect again \(nativeError.localizedDescription)" } } } diff --git a/TelnyxRTC/Telnyx/TxClient.swift b/TelnyxRTC/Telnyx/TxClient.swift index 1ce6a374..ac6a7ef2 100644 --- a/TelnyxRTC/Telnyx/TxClient.swift +++ b/TelnyxRTC/Telnyx/TxClient.swift @@ -628,6 +628,7 @@ extension TxClient : SocketDelegate { func onSocketError(error: Error) { Logger.log.i(message: "TxClient:: SocketDelegate onSocketError()") + let scoketError = TxError.socketConnectionFailed(reason: .socketCancelled(nativeError: error)) self.delegate?.onClientError(error: error) if let txConfig = self.txConfig { if(txConfig.reconnectClient){