ZeroNetJS / zeronet-js

ZeroNet in JS
MIT License
47 stars 9 forks source link

Fix file stream hanging if only 1 peer available #93

Closed mkg20001 closed 6 years ago

mkg20001 commented 6 years ago

OS: chrome on linux

Bundle: git web

Steps to Reproduce:

  1. Open the znjs web-bundle test
  2. Launch the node and add zerohello

Affected Component(s): ...

Expected Results:

The node saves all the files

Actual Results:

The node save only the content json because the other files only get 1 peer instead of two so the final if (sendErr) return cb(sendErr) never gets called

Other information:

Queue stream needs to be able to send error than data in one cb