spdyd: ListenEventHandler creation fix
This commit is contained in:
parent
5774f8110d
commit
6732219dc7
|
@ -1007,6 +1007,9 @@ int SpdyServer::run()
|
||||||
bool bind_ok = false;
|
bool bind_ok = false;
|
||||||
for(int i = 0; i < 2; ++i) {
|
for(int i = 0; i < 2; ++i) {
|
||||||
const char* ipv = (families[i] == AF_INET ? "IPv4" : "IPv6");
|
const char* ipv = (families[i] == AF_INET ? "IPv4" : "IPv6");
|
||||||
|
if(sfd_[i] == -1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
ListenEventHandler *listen_hd = new ListenEventHandler(config_,
|
ListenEventHandler *listen_hd = new ListenEventHandler(config_,
|
||||||
sfd_[i],
|
sfd_[i],
|
||||||
&session_id_seed);
|
&session_id_seed);
|
||||||
|
@ -1014,6 +1017,7 @@ int SpdyServer::run()
|
||||||
std::cerr << ipv << ": Adding listening socket to poll failed."
|
std::cerr << ipv << ": Adding listening socket to poll failed."
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
delete listen_hd;
|
delete listen_hd;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
sessions.add_handler(listen_hd);
|
sessions.add_handler(listen_hd);
|
||||||
bind_ok = true;
|
bind_ok = true;
|
||||||
|
|
Loading…
Reference in New Issue