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);