Skip to content

Commit

Permalink
upnp: enforce available mappings limits only if there is a valid IGD.
Browse files Browse the repository at this point in the history
GitLab: #44
Change-Id: I30ff7177fc9a4a5afbfb6dcd394892792b174e56
  • Loading branch information
AmnaSnene authored and François-Simon Fauteux-Chapleau committed Sep 11, 2024
1 parent 872e82f commit 8905f90
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/upnp/upnp_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,10 @@ UPnPContext::getCurrentIgd() const
void
UPnPContext::enforceAvailableMappingsLimits()
{
// If there is no valid IGD, do nothing.
if (!isReady())
return;

for (auto type : {PortType::TCP, PortType::UDP}) {
int pendingCount = 0;
int inProgressCount = 0;
Expand Down

0 comments on commit 8905f90

Please sign in to comment.