problem: WS proxy uses binary frames (#182)

fix: #180
(cherry picked from commit 2dcb56e8c4467cfdc549fe918427fce593703ca3)
(cherry picked from commit 5df10706dd)
This commit is contained in:
Igor Artamonov
2022-09-23 21:18:28 -04:00
committed by a10zn8
parent 1d9820ee9e
commit 1422446e1b
2 changed files with 14 additions and 3 deletions

View File

@@ -27,7 +27,6 @@ import io.emeraldpay.dshackle.rpc.NativeSubscribe
import io.emeraldpay.etherjar.rpc.json.RequestJson
import io.emeraldpay.etherjar.rpc.json.ResponseJson
import io.netty.buffer.ByteBufInputStream
import io.netty.buffer.Unpooled
import org.reactivestreams.Publisher
import org.slf4j.LoggerFactory
import reactor.core.publisher.Flux
@@ -74,9 +73,8 @@ class WebsocketHandler(
val eventHandler = accessHandler.start(req, routeConfig.blockchain)
val responses = respond(routeConfig.blockchain, control, requests, eventHandler)
.map { Unpooled.wrappedBuffer(it.toByteArray()) }
resp.send(responses)
resp.sendString(responses, Charsets.UTF_8)
.then()
}
}