Skip to content

Commit 70398ae

Browse files
committed
mapport: make ProcessPCP void
Its return value is now unused. (It was also effectively unused before the previous commit, just in a roundabout way).
1 parent 9e6cba2 commit 70398ae

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/mapport.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ using namespace std::chrono_literals;
3030
static constexpr auto PORT_MAPPING_REANNOUNCE_PERIOD{20min};
3131
static constexpr auto PORT_MAPPING_RETRY_PERIOD{5min};
3232

33-
static bool ProcessPCP()
33+
static void ProcessPCP()
3434
{
3535
// The same nonce is used for all mappings, this is allowed by the spec, and simplifies keeping track of them.
3636
PCPMappingNonce pcp_nonce;
@@ -106,7 +106,7 @@ static bool ProcessPCP()
106106
// Sanity-check returned lifetime.
107107
if (actual_lifetime < 30) {
108108
LogPrintLevel(BCLog::NET, BCLog::Level::Warning, "portmap: Got impossibly short mapping lifetime of %d seconds\n", actual_lifetime);
109-
return false;
109+
return;
110110
}
111111
// RFC6887 11.2.1 recommends that clients send their first renewal packet at a time chosen with uniform random
112112
// distribution in the range 1/2 to 5/8 of expiration time.
@@ -117,8 +117,6 @@ static bool ProcessPCP()
117117

118118
// We don't delete the mappings when the thread is interrupted because this would add additional complexity, so
119119
// we rather just choose a fairly short expiry time.
120-
121-
return ret;
122120
}
123121

124122
static void ThreadMapPort()

0 commit comments

Comments
 (0)