From 53544d2a133ff910b60ffcaed15eb95f31f3a29d Mon Sep 17 00:00:00 2001 From: "Ilya.Usov" Date: Fri, 25 Oct 2024 15:48:22 +0200 Subject: [PATCH] Fire signal even if we are unbound --- .../com/jetbrains/rd/framework/impl/RdSignal.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rd-kt/rd-framework/src/main/kotlin/com/jetbrains/rd/framework/impl/RdSignal.kt b/rd-kt/rd-framework/src/main/kotlin/com/jetbrains/rd/framework/impl/RdSignal.kt index 977469216..11db787c6 100644 --- a/rd-kt/rd-framework/src/main/kotlin/com/jetbrains/rd/framework/impl/RdSignal.kt +++ b/rd-kt/rd-framework/src/main/kotlin/com/jetbrains/rd/framework/impl/RdSignal.kt @@ -48,15 +48,15 @@ class RdSignal(val valueSerializer: ISerializer = Polymorphic()) : RdRe val proto = protocol val ctx = serializationContext - if (proto == null || ctx == null) - return + if (proto != null && ctx != null) { + val wire = proto.wire - val wire = proto.wire - - wire.send(rdid) { buffer -> - logSend.trace { "signal `$location` ($rdid):: value = ${value.printToString()}" } - valueSerializer.write(ctx, buffer, value) + wire.send(rdid) { buffer -> + logSend.trace { "signal `$location` ($rdid):: value = ${value.printToString()}" } + valueSerializer.write(ctx, buffer, value) + } } + signal.fire(value) }