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
Essentially what the title says. I'm trying to upload multiple file one after the other making sure that each next upload is submitted if and only if the previous has completed. However I realized that the FileSystemManager is completely frozen upon trying to upload the second file.
BUT if I dispose of the FileSystemManager and re-instantiate it from scratch then the uploads are performed normally as intended which is weird.
_fileSystemManager = FileSystemManager(transporter: _transporter)
_fileSystemManager.logDelegate = self
var success = _fileSystemManager.upload(
name: "/remote/file/path/here/1.txt",
data: data1,
delegate: self
)
if !success {
return false
}
// wait for the first upload to complete
success = _fileSystemManager.upload( // this one is submitted without errors but nothing happens - the file doesnt get uploaded at all
name: "/remote/file/path/here/2.txt",
data: data2,
delegate: self
)
if !success { // success=true
return false
}
If I switch over to this approach everything works:
_fileSystemManager = FileSystemManager(transporter: _transporter)
_fileSystemManager.logDelegate = self
var success = _fileSystemManager.upload(
name: "/remote/file/path/here/1.txt",
data: data1,
delegate: self
)
if !success {
return false
}
// wait for the first upload to complete
_fileSystemManager = FileSystemManager(transporter: _transporter) // REINSTANTIATION
_fileSystemManager.logDelegate = self
success = _fileSystemManager.upload( // with this approach everything works flawlessly
name: "/remote/file/path/here/2.txt",
data: data2,
delegate: self
)
if !success { // success=true
return false
}
This works but it's not optimal. We should be able to reuse the original instance of FileSystemManager right?
Am I missing something?
The text was updated successfully, but these errors were encountered:
…ple files like we used to
We now call disposeFilesystemManager() to force re-instantiating the fs-manager. This seems to resolve the 'hang' in question.
I opened a question regarding this issue:
NordicSemiconductor/IOS-nRF-Connect-Device-Manager#209
Essentially what the title says. I'm trying to upload multiple file one after the other making sure that each next upload is submitted if and only if the previous has completed. However I realized that the FileSystemManager is completely frozen upon trying to upload the second file.
BUT if I dispose of the FileSystemManager and re-instantiate it from scratch then the uploads are performed normally as intended which is weird.
If I switch over to this approach everything works:
This works but it's not optimal. We should be able to reuse the original instance of FileSystemManager right?
Am I missing something?
The text was updated successfully, but these errors were encountered: