Merge pull request #16 from p2p-org/fix_FAIL_NON_SERIALIZED

fixed FAIL_NON_SERIALIZED error
This commit is contained in:
Vyacheslav Shebanov
2022-09-08 13:26:32 +03:00
committed by GitHub

View File

@@ -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 }
}
}