fix: add fatal log for bind failure with host and port details
This commit is contained in:
parent
f598fbc185
commit
8fa1c44f78
@ -70,6 +70,8 @@ void Socket::bind(const std::string &host, const int port) const
|
||||
|
||||
if (::bind(fd_, (struct sockaddr *)&address, sizeof(address)) < 0) // NOLINT(cppcoreguidelines-pro-type-cstyle-cast
|
||||
{
|
||||
Log::fatal("Cannot bind to " + host + ":" + std::to_string(port) +
|
||||
" - address already in use or permission denied");
|
||||
throw std::runtime_error("Bind failed");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user