RangerMauve / dat-store

A CLI tool for backing up hyperdrive datasets
GNU Affero General Public License v3.0
59 stars 14 forks source link

I broke dat-store list #35

Closed DougAnderson444 closed 4 years ago

DougAnderson444 commented 5 years ago

I was repeatedly hitting dat-store list about every 3 seconds, to see the list refresh, and then it just stopped working. Weird. I rebooted ubuntu, stopped and restarted the dat-store, all the cycling I could do, the psa doc still serves up, but no listing of the data anymore.

It's strange, have no idea why, I'll see if I can figure it out but it's stumping me.

DougAnderson444 commented 5 years ago
dat-store list

After working like a charm, now it ....just kinda sits there after you ask it:

image

DougAnderson444 commented 5 years ago

OOooo, a bit later, it shows me this. Did the list command change? Do you need to list localhost as a provider ?

image

DougAnderson444 commented 5 years ago
{ Error: socket hang up
    at createHangUpError (_http_client.js:331:15)
    at Socket.socketOnEnd (_http_client.js:423:23)
    at emitNone (events.js:111:20)
    at Socket.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9) code: 'ECONNRESET' }
RangerMauve commented 5 years ago

I think I had this happen before when I added an archive which didn't have any seeds. The store was unable to do a readFile for the dat.json so it stalled when doing a list of all peers.

Would you be comfortable adding a PR for a timeout on reading the manifest around here?

DougAnderson444 commented 5 years ago

Ok, I will have a look at it and let you know!!

DougAnderson444 commented 5 years ago

Ok, I've got a PR drafted, and I am trying to test this:

      manifest = Promise.race([
        await pda.readManifest(archive),
        new Promise((resolve, reject) => setTimeout(() => resolve(manifest), 500))
      ])

...once I get dat-store to run on my Windows 8 machine

RangerMauve commented 4 years ago

This should be fixed now