problem: disconnects from WebSocket if multiple upstreams are set
This commit is contained in:
@@ -141,10 +141,9 @@ class EthereumWsFactory(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun connect() {
|
fun connect() {
|
||||||
if (keepConnection) {
|
keepConnection = true
|
||||||
connectInternal()
|
connectInternal()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private fun tryReconnectLater() {
|
private fun tryReconnectLater() {
|
||||||
if (!keepConnection) {
|
if (!keepConnection) {
|
||||||
@@ -383,6 +382,7 @@ class EthereumWsFactory(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun close() {
|
override fun close() {
|
||||||
|
log.info("Closing connection to WebSocket $uri")
|
||||||
keepConnection = false
|
keepConnection = false
|
||||||
connection?.dispose()
|
connection?.dispose()
|
||||||
connection = null
|
connection = null
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ class EthereumWsHead(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun stop() {
|
override fun stop() {
|
||||||
ws.close()
|
|
||||||
subscription?.dispose()
|
subscription?.dispose()
|
||||||
subscription = null
|
subscription = null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user