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:
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user