Skip to content

Commit

Permalink
Fix Server::setAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
sgourdas committed Oct 5, 2024
1 parent 5f1f37b commit fa410f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ void Server::setRoot(const std::string& root)
}
}

// FIXME: this method is implemented under the assumption that it is invoked only once (per object).
void Server::setAddress(const std::string& addr)
{
m_addr.addr.clear();
m_addr.addr6.clear();

if (addr.empty()) return;

if (addr.find(':') != std::string::npos) { // IPv6
Expand Down

0 comments on commit fa410f7

Please sign in to comment.