the IO timeout should be ms in acl_vstream_timed_connect()

This commit is contained in:
zhengshuxin 2022-02-16 23:00:40 +08:00
parent d4a829102f
commit 98c8cc0abe

View File

@ -196,12 +196,13 @@ ACL_VSTREAM *acl_vstream_timed_connect(const char *addr, int block_mode,
}
client = acl_vstream_fdopen(connfd, ACL_VSTREAM_FLAG_RW,
rw_bufsize, rw_timeout / 1000, ACL_VSTREAM_TYPE_SOCK);
rw_bufsize, rw_timeout, ACL_VSTREAM_TYPE_SOCK);
if (client == NULL) {
acl_socket_close(connfd);
return NULL;
}
/* must set the IO timeout in ms unit */
ACL_VSTREAM_SET_MS(client);
family = acl_getsockfamily(connfd);