lune-org/lune

lune script stops directly on websocket client

Closed this issue · 1 comments

idk if its a me issue or whatever but when i use this the script stops directly

when i run this it just stops running directly after

local port = 12941

local handle = net.serve(port, {
	handleWebSocket = function(socket)
		print("Got new web socket connection!")
		while true do
			local message = socket.next()
			if message ~= nil then
				socket.send("Echo - " .. message)
			end
		end
		print("Web socket disconnected.")
	end,
})

print(`Listening on 127.0.0.1:{port} :3`)

image

Are you still having this issue? I've been trying to investigate and unfortunately can't reproduce it

I have a repro for this, will be fixed along with other scheduler-related issues before the next major version release