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
This commit is contained in:
James Shubin
2020-01-03 20:42:34 -05:00
parent 2648fb1bb1
commit f07387225b

View File

@@ -384,7 +384,7 @@ func (obj *TftpServerRes) readHandler() func(string, io.ReaderFrom) error {
n, err := rf.ReadFrom(handle) n, err := rf.ReadFrom(handle)
if err != nil { 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! // don't leak additional information to client!
return fmt.Errorf("could not read: %s", filename) return fmt.Errorf("could not read: %s", filename)