Skip to content

Commit

Permalink
Merge pull request #738 from wavesplatform/log-err-on-write-error
Browse files Browse the repository at this point in the history
observables: logErr on wrte failed
  • Loading branch information
alexeykiselev authored Dec 7, 2017
2 parents 4f5a192 + fdf6e6d commit de7f538
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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))
}
}
Expand Down

0 comments on commit de7f538

Please sign in to comment.