From f07387225bfcb0b67850546ace4b74dfefb35ab3 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Fri, 3 Jan 2020 20:42:34 -0500 Subject: [PATCH] engine: resources: Log more info about tftp errors This helps for debugging this kind of issue: https://github.com/pin/tftp/issues/41#issuecomment-570744056 --- engine/resources/tftp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/resources/tftp.go b/engine/resources/tftp.go index 2c00cd10..7e479a62 100644 --- a/engine/resources/tftp.go +++ b/engine/resources/tftp.go @@ -384,7 +384,7 @@ func (obj *TftpServerRes) readHandler() func(string, io.ReaderFrom) error { n, err := rf.ReadFrom(handle) if err != nil { - obj.init.Logf("could not read %s", filename) + obj.init.Logf("could not read %s, error: %+v", filename, err) // don't leak additional information to client! return fmt.Errorf("could not read: %s", filename)