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
Let's assume you call ipfs.dag.get(cid, '/s/o/m/e/v/e/r/y/l/o/n/g/p/a/t/h', {signal: abortSignal}) where ipfs is an IPFS HTTP Client. The control flow would eventually go to ipfs-http-clientresolve function, and then end up in src/http.js fetch function of this package.
Every path element would add an event listener to the original abortSignal. Eventually, if the path is long enough, Node.js starts emitting MaxListenersExceededWarning warnings. I consider this a bug.
Now any-signal library allows you to clear event listeners after use. The solution to the warnings problem might be to call signal.clear after response is done. I would happily contribute, yet any-signal can not really be used here due to CJS/ESM incompatibility: You can not use ESM any-signal from CJS js-ipfs-utils package. See also: #266
The text was updated successfully, but these errors were encountered:
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:
"Priority" labels will show how urgent this is for the team.
"Status" labels will show if this is ready to be worked on, blocked, or in progress.
"Need" labels will indicate if additional input or analysis is required.
Let's assume you call
ipfs.dag.get(cid, '/s/o/m/e/v/e/r/y/l/o/n/g/p/a/t/h', {signal: abortSignal})
whereipfs
is an IPFS HTTP Client. The control flow would eventually go toipfs-http-client
resolve
function, and then end up insrc/http.js
fetch function of this package.Every path element would add an event listener to the original
abortSignal
. Eventually, if the path is long enough, Node.js starts emittingMaxListenersExceededWarning
warnings. I consider this a bug.Now any-signal library allows you to clear event listeners after use. The solution to the warnings problem might be to call
signal.clear
after response is done. I would happily contribute, yet any-signal can not really be used here due to CJS/ESM incompatibility: You can not use ESM any-signal from CJS js-ipfs-utils package. See also: #266The text was updated successfully, but these errors were encountered: