Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion copas-cvs-6.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ <h2><a name="history"></a>History</h2>
threads to wait for its result via <code>future:get()</code> or poll with <code>future:try()</code>.
Errors in the task are propagated to callers. Pending tasks can be cancelled with
<code>future:cancel()</code>.</li>
<li>Deps: bump LuaSocket to 3.x release.</li>
</ul></dd>

<dt><strong>Copas 4.9.0</strong> [11/Mar/2026]</dt>
Expand Down
2 changes: 1 addition & 1 deletion tests/exit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/http-timeout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/httpredirect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tests/largetransfer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/removeserver.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion tests/starve.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion tests/tls-sni.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading