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
Because in Line 167-170, we got fileStream.on('error', ...) again. No matter options.inMemory is true or not, fileStream.on('error', ...) always works with the same error handler.
Hmm... you did spot something: fileStream is the read-stream; ws is the write-stream. That means line 167-168 is redundant. All streams will be read but only the write-to-disk stream will go to disk. I think you can have separate errors for read or writes.
I don't know without testing. It's true that the writestream handles the filestream, so I would guess the writestream would emit one error. If that's true, then the code segment at 151 goes away but then leave lines 167-170.
The following code in Line 151-151 seems redundant:
Because in Line 167-170, we got
fileStream.on('error', ...)
again. No matteroptions.inMemory
istrue
or not,fileStream.on('error', ...)
always works with the same error handler.Is this simply a miss or is there any reason to do
fileStream.on('error', ...)
twice?The text was updated successfully, but these errors were encountered: