diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/AbstractHead.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/AbstractHead.kt index 2f86142c4..75868db55 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/AbstractHead.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/AbstractHead.kt @@ -87,7 +87,7 @@ abstract class AbstractHead @JvmOverloads constructor( // close internal stream if upstream is finished, otherwise it gets stuck, // but technically it should never happen during normal work, only when the Head // is stopping - if (it == SignalType.ON_ERROR && !stopping) { + if ((it == SignalType.ON_ERROR || it == SignalType.CANCEL || it == SignalType.ON_COMPLETE) && !stopping) { log.warn("Received signal $upstreamId $it unexpectedly - restart head") lastHeadUpdated = 0L } else {