Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe3526e7 authored by Steve Elliott's avatar Steve Elliott Committed by Automerger Merge Worker
Browse files

Replace usage of deprecated coroutines methods am: 06f86588

parents 91669cb3 06f86588
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.awaitCancellation
import kotlinx.coroutines.cancel
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.channels.sendBlocking
import kotlinx.coroutines.channels.trySendBlocking
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.Flow
@@ -567,7 +566,7 @@ class Host(private val context: Context, private val server: Server) : HostImplB
        val callback =
          object : ScanCallback() {
            override fun onScanResult(callbackType: Int, result: ScanResult) {
              sendBlocking(
              trySendBlocking(
                RunDiscoveryResponse.newBuilder()
                  .setDevice(
                    Device.newBuilder()
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ fun <T, U> grpcBidirectionalStream(
    override fun onNext(req: T) {
      // Note: this should be made a blocking call, and the handler should run in a separate thread
      // so we get flow control - but for now we can live with this
      if (!inputChannel.offer(req)) {
      if (inputChannel.trySend(req).isFailure) {
        job.cancel(CancellationException("too many incoming requests, buffer exceeded"))
        responseObserver.onError(
          CancellationException("too many incoming requests, buffer exceeded")