From 0a9f27c009286047cd0426efb2462e6a72f4bda1 Mon Sep 17 00:00:00 2001 From: Maxksim Fomenkov Date: Thu, 8 Sep 2022 03:51:06 +0300 Subject: [PATCH] fixed FAIL_NON_SERIALIZED error --- .../io/emeraldpay/dshackle/upstream/ethereum/WsConnection.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/WsConnection.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/WsConnection.kt index cbf8c6cf..a1c95ff8 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/WsConnection.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/WsConnection.kt @@ -388,10 +388,7 @@ open class WsConnection( fun sendRpc(request: JsonRpcRequest) { // submit to upstream in a separate thread, to free current thread (needs for subscription, etc) sendExecutor.execute { - val result = rpcSend.tryEmitNext(request) - if (result.isFailure) { - log.warn("Failed to send RPC request: $result") - } + rpcSend.emitNext(request) { _, res -> res == Sinks.EmitResult.FAIL_NON_SERIALIZED } } }