Skip to content

Commit e7467a5

Browse files
committed
Added DHT node sharing via websocket.
1 parent c008481 commit e7467a5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/kotlin/network/rpc/RPCManager.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ open class RPCManager(configuration: Configuration) : Kademlia(configuration) {
3535
val message = context.message()
3636
when (message) {
3737
"dht" -> {
38-
context.send(Json.encodeToString(knownNodes.values))
38+
context.send(Json.encodeToString(knownNodes.values.toList()))
3939
}
4040

4141
else -> {
@@ -61,7 +61,7 @@ open class RPCManager(configuration: Configuration) : Kademlia(configuration) {
6161
.add(webSocket)
6262
}
6363
sendToSubscribed(Topic.Logging, "Hello, this is Nion node!")
64-
sendToSubscribed(Topic.Logging, Json.encodeToString(knownNodes.values))
64+
sendToSubscribed(Topic.Logging, Json.encodeToString(knownNodes.values.toList()))
6565
}
6666

6767
/**

0 commit comments

Comments
 (0)