GitbookIO / nuts

:chestnut: Releases/downloads server with auto-updater and GitHub as a backend
http://nuts.gitbook.com
Apache License 2.0
1.25k stars 299 forks source link

"download" callback stops working after some time #123

Open steverandy opened 7 years ago

steverandy commented 7 years ago

I found a strange issue with the download hook. I used the code below. The download callback works OK in the begining, but I observed, after the node process running for ~12 hours, the download callback stops working and never called anymore. I had to restart the process to make it work again.

I have not found any specific way to trigger the behavior other than waiting for some time.

Does anyone else have experience this issue before?

let nuts = Nuts({
  token: "xxxxx",
  repository: "xxxxx",
  refreshSecret: "xxxxx",
  cache: `${process.cwd()}/tmp/nuts`
})
nuts.after("download", (download, next) => {
  console.log("after download callback")
  next()
})