-
Notifications
You must be signed in to change notification settings - Fork 300
Conversation
8cb2b5b
to
c211299
Compare
try { | ||
parsed.push(JSON.parse(chunk)) | ||
} catch (err) { | ||
// Browser quirks emit more than needed sometimes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Emit more than needed
? What does this exactly mean? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you have 3 chunks, you sometimes get:
- chunk1
- chunk2
- chunk3
- chunk1+chunk2 => not parsable
do not ask me why, browsers are a weird bunch..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I'm thinking is that "stream" and "chunked" should not exist at the same time. "chunked" is a stream made of small parts of the same files, they should not be parsed individually. "stream" in the another hand, it is the ndjson stuff :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, but "chunked" is represented as a (node) stream where each individual emitted event is equal to one chunk, that's why we are parsing it this way
LGTM :) |
Goal: Fix #76 still not there though..
When ipfs/kubo#1979 is merged we can remove the config settings in the daemon setup