From 6df513e9c221fdc16abc53075e3c6bc84804f014 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 23 Jul 2016 22:09:40 +0200 Subject: print number of bytes in case of premature attachment close diff --git a/rhimport/fetcher.go b/rhimport/fetcher.go index 801b920..536dbe1 100644 --- a/rhimport/fetcher.go +++ b/rhimport/fetcher.go @@ -598,7 +598,7 @@ func writeAttachmentFile(ctx *Context, res *Result, sizeTotal uint64, conv Fetch return nil case chunk, ok := <-ctx.AttachmentChan: if !ok { - rhl.Printf("receiving attachment '%s' failed: channel has been closed prematurely)", ctx.SourceFile) + rhl.Printf("receiving attachment '%s' failed: channel has been closed prematurely, after %d Bytes", ctx.SourceFile, written) res.ResponseCode = http.StatusBadRequest res.ErrorString = fmt.Sprintf("file upload stopped prematurely (after %d Bytes)", written) return nil -- cgit v0.10.2