retrohacker / peerweb

Welcome to the Decentralized Web
http://will.blankenship.io/peerweb
MIT License
118 stars 9 forks source link

Webpage only served after refresh #16

Closed retrohacker closed 8 years ago

retrohacker commented 8 years ago

A bug has manifested. When visiting a new page, webtorrent will download the file but peerweb will not serve it until you refresh.

retrohacker commented 8 years ago

Solved by https://github.com/retrohacker/peerweb/commit/c4b660e8897c6f42dc6b8f70715f06a581137828

We were returning the path to the file before webtorrent had finished downloading it. This approach is rather naive but can be optimized later down the road.