spdyd: ListenEventHandler creation fix

This commit is contained in:
Tatsuhiro Tsujikawa 2013-01-25 21:27:54 +09:00
parent 5774f8110d
commit 6732219dc7
1 changed files with 4 additions and 0 deletions

View File

@ -1007,6 +1007,9 @@ int SpdyServer::run()
bool bind_ok = false;
for(int i = 0; i < 2; ++i) {
const char* ipv = (families[i] == AF_INET ? "IPv4" : "IPv6");
if(sfd_[i] == -1) {
continue;
}
ListenEventHandler *listen_hd = new ListenEventHandler(config_,
sfd_[i],
&session_id_seed);
@ -1014,6 +1017,7 @@ int SpdyServer::run()
std::cerr << ipv << ": Adding listening socket to poll failed."
<< std::endl;
delete listen_hd;
continue;
}
sessions.add_handler(listen_hd);
bind_ok = true;