Merge pull request #4447 from jtattermusch/fix_address_in_use_crash

Fix "Address in use" crash
pull/4452/head
Craig Tiller 9 years ago
commit 01afb1bf29
  1. 2
      src/core/security/server_secure_chttp2.c
  2. 2
      src/core/surface/server_chttp2.c

@ -209,7 +209,7 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr,
tcp, (struct sockaddr *)&resolved->addrs[i].addr,
resolved->addrs[i].len);
port_temp = grpc_tcp_listener_get_port(listener);
if (port_temp >= 0) {
if (port_temp > 0) {
if (port_num == -1) {
port_num = port_temp;
} else {

@ -109,7 +109,7 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) {
tcp, (struct sockaddr *)&resolved->addrs[i].addr,
resolved->addrs[i].len);
port_temp = grpc_tcp_listener_get_port(listener);
if (port_temp >= 0) {
if (port_temp > 0) {
if (port_num == -1) {
port_num = port_temp;
} else {

Loading…
Cancel
Save