From 98c8cc0abed267f9841d9d8409940a5d1acbc95f Mon Sep 17 00:00:00 2001 From: zhengshuxin Date: Wed, 16 Feb 2022 23:00:40 +0800 Subject: [PATCH] the IO timeout should be ms in acl_vstream_timed_connect() --- lib_acl/src/net/acl_vstream_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib_acl/src/net/acl_vstream_net.c b/lib_acl/src/net/acl_vstream_net.c index 3bda78e8e..2504f470f 100644 --- a/lib_acl/src/net/acl_vstream_net.c +++ b/lib_acl/src/net/acl_vstream_net.c @@ -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);