mirror of
https://github.com/zoriya/flood.git
synced 2026-06-07 12:24:50 +00:00
server: torrents: properly catch errors of multiple awaits in /details
This commit is contained in:
@@ -632,6 +632,8 @@ router.get('/:hash/details', async (req, res) => {
|
|||||||
const peers = req.services?.clientGatewayService?.getTorrentPeers(req.params.hash);
|
const peers = req.services?.clientGatewayService?.getTorrentPeers(req.params.hash);
|
||||||
const trackers = req.services?.clientGatewayService?.getTorrentTrackers(req.params.hash);
|
const trackers = req.services?.clientGatewayService?.getTorrentTrackers(req.params.hash);
|
||||||
|
|
||||||
|
await Promise.all([contents, peers, trackers]);
|
||||||
|
|
||||||
callback({
|
callback({
|
||||||
contents: await contents,
|
contents: await contents,
|
||||||
peers: await peers,
|
peers: await peers,
|
||||||
|
|||||||
Reference in New Issue
Block a user