Fallback TURN servers if we can't get them from the server for some reason

// FREEBIE
pull/1/head
Michael Kirk 8 years ago
parent 1898b9fa19
commit bd65dc6ba7

@ -817,6 +817,11 @@ fileprivate let timeoutSeconds = 60
return RTCIceServer(urlStrings: [url])
}
} + [CallService.fallbackIceServer]
}.recover { error -> [RTCIceServer] in
Logger.error("\(self.TAG) fetching ICE servers failed with error: \(error)")
Logger.warn("\(self.TAG) using fallback ICE Servers")
return [CallService.fallbackIceServer]
}
}

Loading…
Cancel
Save