Skip to content

Commit a0e4101

Browse files
elizarovqwwdfsad
authored andcommitted
Publish: better name for shouldHandleException
1 parent b3285f2 commit a0e4101

File tree

1 file changed

+3
-3
lines changed
  • reactive/kotlinx-coroutines-reactive/src

1 file changed

+3
-3
lines changed

reactive/kotlinx-coroutines-reactive/src/Publish.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private class PublisherCoroutine<in T>(
7272
@Volatile
7373
private var cancelled = false // true when Subscription.cancel() is invoked
7474

75-
private var handleException = false // when handleJobException is invoked
75+
private var shouldHandleException = false // when handleJobException is invoked
7676

7777
override val isClosedForSend: Boolean get() = isCompleted
7878
override val isFull: Boolean = mutex.isLocked
@@ -172,7 +172,7 @@ private class PublisherCoroutine<in T>(
172172
if (cancelled) {
173173
// If the parent had failed to handle our exception (handleJobException was invoked), then
174174
// we must not loose this exception
175-
if (handleException && cause != null) handleExceptionViaHandler(parentContext, cause)
175+
if (shouldHandleException && cause != null) handleExceptionViaHandler(parentContext, cause)
176176
} else {
177177
try {
178178
if (cause != null && cause !is CancellationException)
@@ -236,7 +236,7 @@ private class PublisherCoroutine<in T>(
236236
// This way we defer decision to handle this exception based on our ability to send this exception
237237
// to the subscriber (see doLockedSignalCompleted)
238238
override fun handleJobException(exception: Throwable) {
239-
handleException = true
239+
shouldHandleException = true
240240
}
241241

242242
override fun onCompletedExceptionally(exception: Throwable) {

0 commit comments

Comments
 (0)