ipfs / ipfs/go-ipfs-cmds

Better handle ResponseEmitter closure in `Emit`

Open
#69 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
52
Forks
45
PR merge metrics
No merged PRs in 30d

Description

We need to make it clear whether the emitter is simply closed (and the sender should go away) or something actually went wrong.

Really, we should probably just *log* what went wrong and return a boolean where `false` means "closed". Currently, we return an error but it's unclear how this error should be handled. Should the caller follow up with a `SetError` call? (the answer is no but the API is really unclear).

---

Also, we need to make sure that all emitters handle context cancellation correctly.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.