forked from rook/rook
To ensure a file handle is closed, we defer the close command so it is guaranteed to run when the method returns. The closing of the file handle is not going to fail in our usage since we aren't using the SetDeadline on the files that would cancel a request and return an error. Signed-off-by: Travis Nielsen <tnielsen@redhat.com>