Skip to content

Commit

Permalink
try to fix the grpc error
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Nov 7, 2023
1 parent 9bc6be8 commit 6025aca
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.xmtp.android.library

import android.util.Log
import io.grpc.StatusException
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
Expand Down Expand Up @@ -400,6 +401,12 @@ data class Conversations(
}
} catch (error: CancellationException) {
break
} catch (error: StatusException) {
if (error.status.code == io.grpc.Status.Code.UNAVAILABLE) {
continue
} else {
break
}
} catch (error: Exception) {
continue
}
Expand Down

0 comments on commit 6025aca

Please sign in to comment.