[network] do not append port to unix socket paths

x-ref:
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877039
This commit is contained in:
Glenn Strauss 2017-10-03 21:13:09 -04:00
parent 513887fa52
commit c49f515096
1 changed files with 4 additions and 2 deletions

View File

@ -405,8 +405,10 @@ int network_init(server *srv) {
b = buffer_init();
buffer_copy_buffer(b, srv->srvconf.bindhost);
buffer_append_string_len(b, CONST_STR_LEN(":"));
buffer_append_int(b, srv->srvconf.port);
if (b->ptr[0] != '/') { /*(skip adding port if unix socket path)*/
buffer_append_string_len(b, CONST_STR_LEN(":"));
buffer_append_int(b, srv->srvconf.port);
}
/* check if we already know this socket, and if yes, don't init it */
for (j = 0; j < srv->srv_sockets.used; j++) {