Skip to content

Commit 04d05ee

Browse files
jushgithub-actions[bot]
authored andcommitted
Make sure cancellation is propagated
GitOrigin-RevId: 6983d3696f834432b4be689b009a845ac9279afc
1 parent e836772 commit 04d05ee

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ui-maps/src/main/java/com/mapbox/navigation/ui/maps/route/line/RouteLineHistoryRecordingPusher.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import com.mapbox.navigation.ui.maps.util.MutexBasedScope
1515
import com.mapbox.navigation.utils.internal.InternalJobControlFactory
1616
import kotlinx.coroutines.CoroutineDispatcher
1717
import kotlinx.coroutines.Dispatchers
18+
import kotlinx.coroutines.ensureActive
1819
import kotlinx.coroutines.withContext
1920
import kotlin.coroutines.CoroutineContext
2021

@@ -89,6 +90,7 @@ internal class RouteLineHistoryRecordingPusher(
8990
try {
9091
eventFormer(serialisationDispatcher).toJson()
9192
} catch (ex: Throwable) {
93+
ensureActive()
9294
null
9395
}
9496
}

0 commit comments

Comments
 (0)