Commit 3b7ab138 authored by Alex朱枝文's avatar Alex朱枝文

上报加入聊天室失败日志

parent 5891328d
......@@ -406,6 +406,7 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
guard let self = self else { return }
if let error = error, retryCount <= self.maxRetryCount {
printLog("joinChatRoom: \(error)")
self.logJoinChatRoomError(roomId: roomId, errorMsg: error.errorDescription ?? "")
DispatchQueue.main.asyncAfter(deadline: .now() + TimeInterval(5 * retryCount)) {
YHIMHelper.shared.newRegisterAndLoginCurrentUser { _ in
joinRoom(retryCount: retryCount + 1)
......@@ -425,6 +426,17 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
joinRoom(retryCount: 0)
}
}
private func logJoinChatRoomError(roomId: String, errorMsg: String) {
let dic: [AnyHashable : Any] = [
"type": "joinChatroomError",
"chatroomId" : roomId,
"channelId" : playbackInfo?.channelId ?? "",
"uid" : playbackInfo?.uid ?? 0,
"errorMsg": errorMsg
]
YHAliYunLogManager.shared.addModuleName(.logTypeError, remark: dic)
}
private func loadHistoryMessages(roomId: String) {
YHIMHelper.shared.fetchHistoryMessage(roomID: roomId) { [weak self] list, _ in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment