StreamTarget onDone not available anymore since v4.0.0
carstenbittrich-goto opened this issue · 1 comments
Hi, we noticed that you removed the onDone method of StreamTarget in v4.0.0. Is there an alternative way to know reliably when all data has passed through the muxer once muxer.finalize() has been called?
We forward the data send via StreamTarget to a file, but can't use FileSystemWritableFileStream directly for various reasons and used the onDone method to trigger to close the file handle.
Kudos for catching it! I removed the onDone
callback since it was simply always called at the end of .finalize()
and therefore was not providing any new information.
Assume that once .finalize()
returns, no more data will be sent to the StreamTarget, so whichever logic you placed into onDone
, you should place it after .finalize()
.