Skip to content

Commit

Permalink
Lower log level for ping timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bast committed Nov 3, 2023
1 parent 7eb80e2 commit 5f1cc0f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,11 @@ class ElectrumClient(
?: ServerError(request, JsonRPCError(0, "timeout"))
return when (result) {
is ServerError -> {
logger.warning { "received error for ${request.method}: ${result.error.message}" }
when (request) {
// Some electrum servers don't seem to respond to ping requests, even though they keep the connection alive.
is Ping -> logger.debug { "received error for ${request.method}: ${result.error.message}" }
else -> logger.warning { "received error for ${request.method}: ${result.error.message}" }
}
Either.Left(result)
}
else -> Either.Right(result as T)
Expand Down

0 comments on commit 5f1cc0f

Please sign in to comment.