swarm.connect timeout?
achingbrain opened this issue · 2 comments
achingbrain commented
It would be really useful to have a timeout when trying to dial a remote peer.
await ipfs.swarm.connect(multiaddr, {
timeout: 5000 // ms
})
// if the timeout is reached, throw and error with a .code property with the value 'ETIMEOUT'
daviddias commented
We really need to get the Cancellable Requests / Timeouts story on. I hear that async/wait & promises make that so much easier :) => #58
daviddias commented
Let's follow up on timeouts on #58