This repository was archived by the owner on Mar 10, 2020. It is now read-only.
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
No timeout on ipfs.ls is called #71
Closed
Description
Is there a reason why no timeout implemented on the http.request? My problem is: If I request an unavailable hash, the request and its socket stays open forever, which causes problems.
Tested on DigitalOcean Ubuntu 14.04 and OS X 10.10 With node 4.0.0 and ipfs version 0.3.8-dev.
In the following code the callback is never called:
var ipfsApi = require('ipfs-api');
var ipfs = ipfsApi('localhost','5001');
var start = (new Date());
console.log( 'started on ' + start );
ipfs.ls("QmPzWqn4ZRhGFJCTnNvaz3Wwe6inKQ4n6nJic4bAw3maz3", function( err, res ) {
console.log('got error after '+((new Date() - start)), err );
});