Permalink
Browse files

refactor(server): chain calls to res.on()

  • Loading branch information...
mycoboco committed Aug 28, 2018
1 parent 8ee3a87 commit 0ae01cb1388cf427fdc132089ab8797a22a90cd7
Showing with 1 addition and 1 deletion.
  1. +1 −1 server/lib/api.js
View
@@ -327,7 +327,7 @@ function song(req, res) {
rs = fs.createReadStream(songs[0].path)
}
res.on('error', function () { rs.close() })
res.on('close', function () { rs.close() })
.on('close', function () { rs.close() })
rs.pipe(res)
})
})

0 comments on commit 0ae01cb

Please sign in to comment.