From c3b2e0b0e15500b57f444e41bb516f5e21b8e6b8 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Thu, 12 Jan 2023 10:30:56 +0100 Subject: [PATCH 1/3] deps(luasocket): bump to 3.x --- copas-cvs-6.rockspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copas-cvs-6.rockspec b/copas-cvs-6.rockspec index 6e3b393..c744913 100644 --- a/copas-cvs-6.rockspec +++ b/copas-cvs-6.rockspec @@ -28,7 +28,7 @@ description = { } dependencies = { "lua >= 5.1, < 5.6", - "luasocket >= 2.1, <= 3.0rc1-2", + "luasocket ~> 3", "coxpcall >= 1.14", "binaryheap >= 0.4", "timerwheel ~> 1", From a2312289a8aa32c11a8dce596e5de29ed2d98d64 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Fri, 27 Mar 2026 15:09:29 +0100 Subject: [PATCH 2/3] fix(ci): bind to 'localhost' ('*' not allowed in CI) --- tests/exit.lua | 2 +- tests/http-timeout.lua | 2 +- tests/httpredirect.lua | 2 +- tests/largetransfer.lua | 4 ++-- tests/removeserver.lua | 2 +- tests/starve.lua | 2 +- tests/tls-sni.lua | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/exit.lua b/tests/exit.lua index ecf7321..4c37c8a 100644 --- a/tests/exit.lua +++ b/tests/exit.lua @@ -25,7 +25,7 @@ else end done = false -local server = socket.bind("*", 20000) +local server = socket.bind("localhost", 20000) local message = "Hello world!" copas.addserver(server, function(skt) diff --git a/tests/http-timeout.lua b/tests/http-timeout.lua index 5379b4b..8a13005 100644 --- a/tests/http-timeout.lua +++ b/tests/http-timeout.lua @@ -47,7 +47,7 @@ end, true) -- true: make it the default for all threads/coros local function runtest() - local s1 = socket.bind('*', 49500) + local s1 = socket.bind('localhost', 49500) copas.addserver(s1, copas.handler(function(skt) -- HTTP server that will optionally do a timeout on the request, or on the response copas.setsocketname("Server 49500", skt) diff --git a/tests/httpredirect.lua b/tests/httpredirect.lua index ac7427e..55c560f 100644 --- a/tests/httpredirect.lua +++ b/tests/httpredirect.lua @@ -49,7 +49,7 @@ copas.addthread(function() -- initial redirect to the same url, over https, hence the final -- redirect is a downgrade which then errors out -- so we set up a local http-server to deal with this - local server = assert(socket.bind("127.0.0.1", 9876)) + local server = assert(socket.bind("localhost", 9876)) local crlf = string.char(13)..string.char(10) copas.addserver(server, function(skt) skt = copas.wrap(skt) diff --git a/tests/largetransfer.lua b/tests/largetransfer.lua index 46363d6..a311c79 100644 --- a/tests/largetransfer.lua +++ b/tests/largetransfer.lua @@ -17,7 +17,7 @@ local done = 0 local sparams, cparams local function runtest() - local s1 = socket.bind('*', 49500) + local s1 = socket.bind('localhost', 49500) copas.addserver(s1, copas.handler(function(skt) copas.setsocketname("Server 49500", skt) copas.setthreadname("Server 49500") @@ -30,7 +30,7 @@ local function runtest() done = done + 1 end, sparams)) - local s2 = socket.bind('*', 49501) + local s2 = socket.bind('localhost', 49501) copas.addserver(s2, copas.handler(function(skt) skt:settimeout(0) -- set, uses the `receivepartial` method copas.setsocketname("Server 49501", skt) diff --git a/tests/removeserver.lua b/tests/removeserver.lua index 10928c2..5da5e7e 100644 --- a/tests/removeserver.lua +++ b/tests/removeserver.lua @@ -5,7 +5,7 @@ local copas = require("copas") local socket = require("socket") -local wskt = socket.bind("*", 0) +local wskt = socket.bind("localhost", 0) local whost, wport = wskt:getsockname() wport = tonumber(wport) diff --git a/tests/starve.lua b/tests/starve.lua index 4b70667..063de01 100644 --- a/tests/starve.lua +++ b/tests/starve.lua @@ -15,7 +15,7 @@ local body = ("A"):rep(1024*1024*50) -- 50 mb string local done = 0 local function runtest() - local s1 = socket.bind('*', 49500) + local s1 = socket.bind('localhost', 49500) copas.addserver(s1, copas.handler(function(skt) copas.setsocketname("Server 49500", skt) copas.setthreadname("Server 49500") diff --git a/tests/tls-sni.lua b/tests/tls-sni.lua index c2b7453..101a226 100644 --- a/tests/tls-sni.lua +++ b/tests/tls-sni.lua @@ -67,7 +67,7 @@ local function echoHandler(skt) end end -server = assert(socket.bind("*", port)) +server = assert(socket.bind("localhost", port)) copas.addserver(server, copas.handler(echoHandler, server_params)) copas.addthread(function() From 0a59c9d769cd15a52f8792503efcd8a44f9eda59 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Fri, 27 Mar 2026 17:48:59 +0100 Subject: [PATCH 3/3] chore(docs): update changelog with LuaSocket bump --- docs/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/index.html b/docs/index.html index 21c668f..3fdb2bb 100644 --- a/docs/index.html +++ b/docs/index.html @@ -106,6 +106,7 @@

History

threads to wait for its result via future:get() or poll with future:try(). Errors in the task are propagated to callers. Pending tasks can be cancelled with future:cancel(). +
  • Deps: bump LuaSocket to 3.x release.
  • Copas 4.9.0 [11/Mar/2026]