From b78c515724ed6fd5d2bfcd88d639f7dc2057a56c Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Fri, 10 Jul 2015 16:01:10 +1000 Subject: [PATCH] Debug output on request errors --- internal/model/rwfolder.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/model/rwfolder.go b/internal/model/rwfolder.go index 98259000b..446946f73 100644 --- a/internal/model/rwfolder.go +++ b/internal/model/rwfolder.go @@ -1185,6 +1185,9 @@ func (p *rwFolder) pullerRoutine(in <-chan pullBlockState, out chan<- *sharedPul buf, lastError := p.model.requestGlobal(selected, p.folder, state.file.Name, state.block.Offset, int(state.block.Size), state.block.Hash, 0, nil) activity.done(selected) if lastError != nil { + if debug { + l.Debugln("request:", p.folder, state.file.Name, state.block.Offset, state.block.Size, "returned error:", lastError) + } continue } @@ -1192,6 +1195,9 @@ func (p *rwFolder) pullerRoutine(in <-chan pullBlockState, out chan<- *sharedPul // try pulling it from another device. _, lastError = scanner.VerifyBuffer(buf, state.block) if lastError != nil { + if debug { + l.Debugln("request:", p.folder, state.file.Name, state.block.Offset, state.block.Size, "hash mismatch") + } continue }