From 1e54f08299b9aa1f225a667e15fdfd4f82149f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB?= Date: Wed, 25 Sep 2024 14:56:19 +0400 Subject: [PATCH] Make nullable --- .../io/emeraldpay/dshackle/upstream/ethereum/GenericWsHead.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/GenericWsHead.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/GenericWsHead.kt index 1472f921d..c796f983e 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/GenericWsHead.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/GenericWsHead.kt @@ -65,7 +65,7 @@ class GenericWsHead( } private val chainIdValidator = chainSpecific.chainSettingsValidator(upstream.getChain(), upstream, jsonRpcWsClient) - private val connectionId = AtomicReference("") + private val connectionId = AtomicReference(null) private val subscribed = AtomicBoolean(false) private val connected = AtomicBoolean(false) private val isSyncing = AtomicBoolean(false) @@ -186,7 +186,7 @@ class GenericWsHead( headLivenessSink.emitNext(HeadLivenessState.DISCONNECTED) { _, res -> res == Sinks.EmitResult.FAIL_NON_SERIALIZED } subscribed.set(false) connected.set(false) - connectionId.set("") + connectionId.set(null) } else if (it.connectionState == WsConnection.ConnectionState.CONNECTED) { connected.set(true) return@map true