Skip to content

Commit

Permalink
Added temporary mock identify protocol: accept and reset the stream
Browse files Browse the repository at this point in the history
  • Loading branch information
erwin-kok committed Aug 30, 2023
1 parent d519ce6 commit e6c6406
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ fun main() {
private suspend fun listener(scope: CoroutineScope, host: Host, redisClient: Jedis, testTimeout: Duration): Boolean {
logger.info { "Configured as listener..." }
val pingService = PingService(scope, host)
// Temporary implementation until the issue around the identify protocol is solved (next release).
// This temporary implementation accepts an identify stream, and immediately resets it.
host.setStreamHandler(ProtocolId.of("/ipfs/id/1.0.0")) { stream ->
stream.reset()
}
val hostAddress = host.addresses().firstOrNull()
if (hostAddress == null) {
logger.error { "Failed to get listen address" }
Expand Down

0 comments on commit e6c6406

Please sign in to comment.