From fdf6e6d4ffa1f1c54a9f22ec5e9fe5a2daafee2e Mon Sep 17 00:00:00 2001 From: Ilya Smagin Date: Thu, 7 Dec 2017 18:50:05 +0300 Subject: [PATCH] observables: logErr on wrte failed --- .../scala/com/wavesplatform/network/RxExtensionLoader.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/com/wavesplatform/network/RxExtensionLoader.scala b/src/main/scala/com/wavesplatform/network/RxExtensionLoader.scala index b32577d746f..e13b11ac40f 100644 --- a/src/main/scala/com/wavesplatform/network/RxExtensionLoader.scala +++ b/src/main/scala/com/wavesplatform/network/RxExtensionLoader.scala @@ -61,7 +61,7 @@ object RxExtensionLoader extends ScorexLogging { val ch = best.channel log.debug(s"${id(ch)} Requesting extension signatures ${if (optimistic) "optimistically" else ""}, last ${knownSigs.length} are ${formatSignatures(knownSigs)}") val blacklisting = scheduleBlacklist(ch, s"Timeout loading extension").runAsync - Task(ch.writeAndFlush(GetSignatures(knownSigs))).runAsync + Task(ch.writeAndFlush(GetSignatures(knownSigs))).logErr.runAsync state.withLoaderState(LoaderState.ExpectingSignatures(ch, knownSigs, blacklisting)) case None => log.trace(s"Holding on requesting next sigs, $state") @@ -109,7 +109,7 @@ object RxExtensionLoader extends ScorexLogging { } else { log.trace(s"${id(ch)} Requesting all required blocks(size=${unknown.size})") val blacklistingAsync = scheduleBlacklist(ch, "Timeout loading first requested block").runAsync - Task(unknown.foreach(s => ch.writeAndFlush(GetBlock(s)))).runAsync + Task(unknown.foreach(s => ch.writeAndFlush(GetBlock(s)))).logErr.runAsync state.withLoaderState(LoaderState.ExpectingBlocks(ch, unknown, unknown.toSet, Set.empty, blacklistingAsync)) } }