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
`bitswap._receiveMessage` is an async function so you need to `await` on it in order to correctly handle any errors encountered.
I've been seeing `unhandledPromiseRejection` events during test runs, turns out it's when you spin up two nodes, get them to dial each other and transfer data - the tests can shut the nodes down and clean up their repos before they've finished processing incoming blocks leading to `Error: ENOENT: no such file or directory` errors as the repos are deleted out from under the blockstore.
`await`ing on the result of `bitswap._receiveMessage` fixes this by handling the error.
0 commit comments