You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.
I have a scenario in SAFE Drive where I await on NFS File.close(), and it returns immediately (as if I had not used await). My code (not pushed) looks like this:
async close (nfs) {
try {
this.releaseDescriptor()
this._flags = undefined
if (this._fileOpened) await this._fileOpened.close()
return C.SUCCESS
} catch (e) { error(e); return e }
return new Error('Unknown error closing NFS file')
}
If I break on the line: if (this._fileOpened) await this._fileOpened.close(), set a break on all the following lines in the function and 'run', I break immediately on the closing } of the function. What should happen is that I break at return C.SUCCESS.
This shows that the await on File.close() is not being honoured.
Repeating this in another scenario (reading the file I just created in the above process) the same thing is happening.
I don't understand the Rust code which is called by the above, so can't say if that might be the reason for this.
Steps to Reproduce (for bugs)
A bit involved, so first thing is for someone to inspect the Maidsafe code. I've looked as far as I can understand and it looks ok, so I suggest someone walk through using their eyes, including into the Rust to see if there is anything obvious before I explain how to do this with a SAFE Drive setup (which also needs me to commit stuff).
I have a scenario in SAFE Drive where I await on NFS
File.close()
, and it returns immediately (as if I had not used await). My code (not pushed) looks like this:If I break on the line:
if (this._fileOpened) await this._fileOpened.close()
, set a break on all the following lines in the function and 'run', I break immediately on the closing}
of the function. What should happen is that I break atreturn C.SUCCESS
.This shows that the await on
File.close()
is not being honoured.Repeating this in another scenario (reading the file I just created in the above process) the same thing is happening.
Looking at SAFE nodejs code it seems fine in
api/emulations/nfs.js
: https://github.com/maidsafe/safe_app_nodejs/blob/83a5bc47575270723c2fa748cde104d0ec770250/src/api/emulations/nfs.js#L194-L207I don't understand the Rust code which is called by the above, so can't say if that might be the reason for this.
Steps to Reproduce (for bugs)
A bit involved, so first thing is for someone to inspect the Maidsafe code. I've looked as far as I can understand and it looks ok, so I suggest someone walk through using their eyes, including into the Rust to see if there is anything obvious before I explain how to do this with a SAFE Drive setup (which also needs me to commit stuff).
Your Environment
The text was updated successfully, but these errors were encountered: