nghttpx: Discard iaddrs early

This commit is contained in:
Tatsuhiro Tsujikawa 2016-10-23 19:55:58 +09:00
parent 10a84f3e3d
commit 5b9cacc2d7
1 changed files with 7 additions and 5 deletions

View File

@ -1245,14 +1245,16 @@ int event_loop() {
redirect_stderr_to_errorlog(); redirect_stderr_to_errorlog();
} }
auto iaddrs = get_inherited_addr_from_env(config); {
auto iaddrs = get_inherited_addr_from_env(config);
if (create_acceptor_socket(config, iaddrs) != 0) { if (create_acceptor_socket(config, iaddrs) != 0) {
return -1; return -1;
}
close_unused_inherited_addr(iaddrs);
} }
close_unused_inherited_addr(iaddrs);
auto loop = ev_default_loop(config->ev_loop_flags); auto loop = ev_default_loop(config->ev_loop_flags);
int ipc_fd; int ipc_fd;