Skip to content

Commit

Permalink
Fix MediaProxy to make it actually start up
Browse files Browse the repository at this point in the history
  • Loading branch information
tadzik committed Aug 14, 2024
1 parent a99a449 commit de767bf
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/components/media-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export class MediaProxy {
/**
* Only used if start() is called.
*/
private readonly app?: Application;
private server?: Server;
/**
* Get the express router used for handling calls.
Expand All @@ -61,10 +60,8 @@ export class MediaProxy {
const app = express();
app.use(this.internalRouter);
return new Promise<void>((res) => {
if (this.app) {
this.server = this.app.listen(port, hostname, backlog, () => res());
log.info(`Media proxy API listening on port ${port}`);
}
this.server = app.listen(port, hostname, backlog, () => res());
log.info(`Media proxy API listening on port ${port}`);
});
}

Expand Down

0 comments on commit de767bf

Please sign in to comment.