Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

pubsub: undo workaround of skipping first message #63

Merged
merged 1 commit into from
Nov 22, 2017

Conversation

keks
Copy link
Contributor

@keks keks commented Nov 20, 2017

Fixes pubsub after ipfs/kubo#4402 is in.

Before the commands rewrite we made go-ipfs send out the http response immediately by first sending an empty pubsub message. It was only there to force flushing the http connection. This message was discarded on the go-ipfs-api side.
Now go-ipfs uses the new cmds library. We can now properly flush and got rid of this hack. Therefore we mustn't drop the first message anymore.

@diasdavid I presume you'll have to make this change to js-ipfs-api as well?

@ghost ghost assigned keks Nov 20, 2017
@ghost ghost added the status/in-progress In progress label Nov 20, 2017
@keks keks requested a review from a user November 20, 2017 12:08
@ghost
Copy link

ghost commented Nov 20, 2017

Thanks!

@daviddias
Copy link
Member

@keks exactly as I thought during the IPFS All Hands -- ipfs/team-mgmt#526 --, js-ipfs-api catches the deserialization error and ignores that first message https://github.com/ipfs/js-ipfs-api/blob/master/src/utils/pubsub-message-stream.js#L20-L26

All good!

@keks
Copy link
Contributor Author

keks commented Nov 22, 2017

ipfs/kubo#4402 is in, tests pass, let's merge!

@keks keks merged commit 057ec9a into master Nov 22, 2017
@ghost ghost removed the status/in-progress In progress label Nov 22, 2017
@ghost ghost mentioned this pull request Nov 22, 2017
@ghost ghost deleted the fix/pubsub-dont-skip branch November 22, 2017 17:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants