Hacker News new | ask | show | jobs
by Randor 2188 days ago
Hi,

A quick glance at https://github.com/johang/btfs/blob/master/src/btfs.cc on line 190 reveals that no seeders would result in an infinite wait state: pthread_cond_wait(&signal_cond, &lock);

The author could mitigate this by automatically failing any reads where there are zero seeders and/or if the peer piece map does not contain the block.