Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: unhandled promise rejection when async work done after handshake (…
…#2) If you do async work after invoking it-handshake but before awaiting on any of the fields of the response, an unhandledPromiseRejection can occur if the `stream.sink` method rejects. This manifests itself in libp2p vis `multiformats/js-multistream-select` as: ```js (node:82951) UnhandledPromiseRejectionWarning: Error: already piped at Object.sink (node_modules/it-pair/index.js:10:24) at module.exports (node_modules/it-handshake/src/index.js:15:30) at module.exports (src/select.js:10:57) at Dialer.select (src/index.js:27:12) at Context.<anonymous> (test/dialer.spec.js:43:26) ``` Also: - Updates all deps - Removes node Buffers in favour of Uint8Arrays
- Loading branch information