mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Closing the file handler after finishing readat
This commit is contained in:
@@ -260,6 +260,7 @@ func (d *AllocDir) FSReadAt(allocID string, path string, offset int64, limit int
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
io.Copy(w, io.LimitReader(f, limit))
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user