|
@@ -834,12 +834,12 @@ hio_t* hio_create_socket(hloop_t* loop, const char* host, int port, hio_type_e t
|
|
|
memset(&addr, 0, sizeof(addr));
|
|
memset(&addr, 0, sizeof(addr));
|
|
|
int ret = -1;
|
|
int ret = -1;
|
|
|
#ifdef ENABLE_UDS
|
|
#ifdef ENABLE_UDS
|
|
|
- if (port <= 0) {
|
|
|
|
|
|
|
+ if (port < 0) {
|
|
|
sockaddr_set_path(&addr, host);
|
|
sockaddr_set_path(&addr, host);
|
|
|
ret = 0;
|
|
ret = 0;
|
|
|
}
|
|
}
|
|
|
#endif
|
|
#endif
|
|
|
- if (port > 0) {
|
|
|
|
|
|
|
+ if (port >= 0) {
|
|
|
ret = sockaddr_set_ipport(&addr, host, port);
|
|
ret = sockaddr_set_ipport(&addr, host, port);
|
|
|
}
|
|
}
|
|
|
if (ret != 0) {
|
|
if (ret != 0) {
|