Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is/enhancement/error types #113

Merged
merged 4 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion TelnyxRTC.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions TelnyxRTC/Telnyx/Models/TxError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions TelnyxRTC/Telnyx/TxClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
Loading