fixed one bug in server_binding() of acl_udp_server.c when binding addr failed.

This commit is contained in:
zsx 2018-11-28 16:08:26 +08:00
parent 877e7aa5d4
commit b2c8f16308
2 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,8 @@
修改历史列表:
643) 2018.11.28
643.1) bugfix: acl_udp_server.c 中 server_binding 绑定失败时不应放在事件监控中
642) 2018.11.15
642.1) bugfix: acl_json_utio.c, acl_json_build() 当数组成员为字符串类型时,应允许空串的存在

View File

@ -713,6 +713,11 @@ static void server_binding(UDP_SERVER *server, ACL_IFCONF *ifconf)
get_addr(ifaddr->addr, addr, sizeof(addr));
stream = server_bind_one(addr);
if (stream == NULL) {
acl_msg_error("%s(%d): bind %s error %s", __FUNCTION__,
__LINE__, addr, acl_last_serror());
continue;
}
acl_event_enable_read(server->event, stream,
0, udp_server_read, server);
@ -726,6 +731,8 @@ static void server_binding(UDP_SERVER *server, ACL_IFCONF *ifconf)
acl_msg_fatal("%s(%d), %s: binding all addrs failed!",
__FILE__, __LINE__, __FUNCTION__);
}
server->count = i;
}
static UDP_SERVER *servers_binding(const char *service,