From e07b309c8e3217812ec3a1f047e18ed6eded84ee Mon Sep 17 00:00:00 2001 From: lijunlong Date: Sun, 24 Mar 2024 17:47:16 +0800 Subject: [PATCH] change ci. --- .travis.yml | 4 ++-- lib/resty/core/socket.lua | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3aadce918..216643a67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -70,7 +70,7 @@ install: - git clone https://github.com/openresty/openresty.git ../openresty - git clone https://github.com/openresty/openresty-devel-utils.git - git clone https://github.com/simpl/ngx_devel_kit.git ../ndk-nginx-module - - git clone https://github.com/openresty/lua-nginx-module.git ../lua-nginx-module + - git clone -b cdata2 https://github.com/openresty/lua-nginx-module.git ../lua-nginx-module - git clone https://github.com/openresty/no-pool-nginx.git ../no-pool-nginx - git clone https://github.com/openresty/echo-nginx-module.git ../echo-nginx-module - git clone https://github.com/openresty/lua-resty-lrucache.git @@ -79,7 +79,7 @@ install: - git clone https://github.com/openresty/set-misc-nginx-module.git ../set-misc-nginx-module - git clone https://github.com/openresty/mockeagain.git - git clone https://github.com/openresty/test-nginx.git - - git clone https://github.com/openresty/stream-lua-nginx-module.git ../stream-lua-nginx-module + - git clone -b cdata2 https://github.com/openresty/stream-lua-nginx-module.git ../stream-lua-nginx-module script: - cd luajit2/ diff --git a/lib/resty/core/socket.lua b/lib/resty/core/socket.lua index cd8385676..7f4cd29e3 100644 --- a/lib/resty/core/socket.lua +++ b/lib/resty/core/socket.lua @@ -382,11 +382,19 @@ end do - local tcp_method_table = registry.__tcp_cosocket_mt - tcp_method_table.send_cdata = tcp_send_cdata + local tcp_mt = registry.__tcp_cosocket_mt + tcp_mt.send_cdata = tcp_send_cdata - local udp_method_table = registry.__udp_cosocket_mt - udp_method_table.send_cdata = udp_send_cdata + local raw_tcp_mt = registry.__raw_req_tcp_cosocket_mt + raw_tcp_mt.send_cdata = tcp_send_cdata + + local udp_mt = registry.__udp_cosocket_mt + udp_mt .send_cdata = udp_send_cdata + + if subsystem == "stream" then + local raw_udp_mt = registry.__raw_udp_cosocket_mt + raw_udp_mt.send_cdata = udp_send_cdata + end end