mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-07 02:28:53 +08:00
nghttpx: Document failure case on bind()
This commit is contained in:
@@ -357,6 +357,9 @@ std::unique_ptr<AcceptHandler> create_acceptor(ConnectionHandler *handler,
|
|||||||
}
|
}
|
||||||
#endif // TCP_DEFER_ACCEPT
|
#endif // TCP_DEFER_ACCEPT
|
||||||
|
|
||||||
|
// When we are executing new binary, and the old binary did not
|
||||||
|
// bind privileged port (< 1024) for some reason, binding to those
|
||||||
|
// ports will fail with permission denied error.
|
||||||
if (bind(fd, rp->ai_addr, rp->ai_addrlen) == -1) {
|
if (bind(fd, rp->ai_addr, rp->ai_addrlen) == -1) {
|
||||||
auto error = errno;
|
auto error = errno;
|
||||||
LOG(WARN) << "bind() syscall failed, error=" << error;
|
LOG(WARN) << "bind() syscall failed, error=" << error;
|
||||||
|
|||||||
Reference in New Issue
Block a user