Skip to content

Commit

Permalink
fix to make it compatible with first versions of UPNP support
Browse files Browse the repository at this point in the history
  • Loading branch information
Cabecinha84 committed Dec 13, 2023
1 parent f489f52 commit 7e13ced
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apiServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ let initialHash = hash(fs.readFileSync(path.join(__dirname, '/config/userconfig.

async function loadUpnpIfRequired() {
// direct node (non UPnP)
if (userconfig.initial.apiport) {
await upnpService.setupUPNP(apiPort);
}
if (userconfig.initial.apiport === config.server.apiport && !userconfig.initial.routerIP) {
return;
}
Expand Down
3 changes: 3 additions & 0 deletions homeServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ async function initiate() {
log.error(`Flux port ${apiPort} is not supported. Shutting down.`);
process.exit();
}
if (userconfig.initial.apiport) {
await upnpService.setupUPNP(apiPort);
}
if (userconfig.initial.apiport && userconfig.initial.apiport !== config.server.apiport) {
const verifyUpnp = await upnpService.verifyUPNPsupport(apiPort);
if (verifyUpnp !== true) {
Expand Down

0 comments on commit 7e13ced

Please sign in to comment.