Skip to content

Commit

Permalink
fixup: pcp Lint spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
laanwj committed May 23, 2024
1 parent 31c85ca commit 8ba85b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/util/pcp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ constexpr size_t PCP_MAP_SIZE = 36;
constexpr size_t PCP_HDR_VERSION_OFS = NATPMP_HDR_VERSION_OFS;
//! Opcode field (1 byte).
constexpr size_t PCP_HDR_OP_OFS = NATPMP_HDR_OP_OFS;
//! Requested lifetime (request), granted lifetime (reponse) (2 bytes).
//! Requested lifetime (request), granted lifetime (response) (2 bytes).
constexpr size_t PCP_HDR_LIFETIME_OFS = 4;

// Request header offsets (RFC6887 7.1), relative to start of packet.
Expand Down Expand Up @@ -231,12 +231,12 @@ static std::optional<std::vector<uint8_t>> PCPSendRecv(Sock &sock, const std::st

// Wait for response(s) until we get a valid response, a network error, or time out.
while (true) {
Sock::Event occured = 0;
if (!sock.Wait(std::chrono::milliseconds(1000), Sock::RECV, &occured)) {
Sock::Event occurred = 0;
if (!sock.Wait(std::chrono::milliseconds(1000), Sock::RECV, &occurred)) {
LogPrintLevel(BCLog::NET, BCLog::Level::Warning, "%s: Could not wait on socket: %s\n", protocol, NetworkErrorString(WSAGetLastError()));
return std::nullopt; // Network-level error, probably no use retrying.
}
if (!occured) {
if (!occurred) {
LogPrintLevel(BCLog::NET, BCLog::Level::Debug, "%s: Timeout\n", protocol);
break; // Retry.
}
Expand Down

0 comments on commit 8ba85b9

Please sign in to comment.