-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Writing to a websocket from a timer-callback fails:
local weblit = require("weblit")
local timer = require("timer")
weblit.app
.bind({host = "127.0.0.1", port = 1337})
.use(weblit.logger)
.use(weblit.autoHeaders)
.use(weblit.websocket({path = '/ws', host = '127.0.0.1'}, function(req, read, write)
for thing in read do
p(thing)
timer.setTimeout(1000, function()
print("timeout")
write({opcode = 1; payload = "websocket-hello"})
end)
end
write()
end))
.start()
...the same happens if I try to write to a websocket from a childprocess's on('exit') callback
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels