Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upfinished torrents files get lock on electron-builder releases #1159
Comments
This comment has been minimized.
This comment has been minimized.
|
This issue has been open for a while so it's probably stale. I'm going to close it for now. If you're still experiencing this issue, please leave a comment or open a new issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
webtorrent 0.98.19
node 0.98.19
Windows 10 64 bits
I have a weird issue, dont know if is related to webtorrent or the electron-builder.
Im writing an application like webtorrent-desktop using webtorrent in electron, always is working fine, more or less, but when I export the application using the electron-builder, the application created to distribute the program, keep the downloaded torrents "lock", or the file stream open, and the file is not accesible, and the torrent.fileModTimes return invalid dates, because the files are writen when the client is closed and not when the torrent finish.
Here is a normal event when torrent finish:
This works perfect calling the application with "electron ." in the terminal, all torrent fileModTimes are saved correctly and when load the torrents using that the torrent dont check again all data.
But when I export the application with electron-builder, the torrent finished DONT WRITE the data to disk, before the client close, so the torrent.fileModTimes() function return not valid data because the files are writen after, when the client is closed, like the torrent stram is "locked" for some weird reason.
To solve that i need to do this:
The stream is closed, and the file data is saved (the files are updates in the HDD), and when I call the torrent.fileModTimes() I get valid dates.
But this is a dirty fix, because when I close the store, the file cant be read by webtorrent, and the upload speed drop to 0 kb/s because the file is closed, stopping all seed to other clients.
Someone have similar cases with the stream or something related using the files generated by the electron-builder ?
all help is wellcome.