--- a/luaevent/test/test.lua Wed Jun 13 03:54:01 2007 +0000 +++ b/luaevent/test/test.lua Wed Jun 13 04:32:12 2007 +0000 @@ -8,12 +8,13 @@ local function echoHandler(skt) while true do local data,ret = luaevent.receive(skt, 10) - if data == "quit" or ret == 'closed' then + if data == "quit" or ret == 'closed' or not data then break end --collectgarbage() - luaevent.send(skt, data) + if not luaevent.send(skt, data) then return end end + if skt then skt:close() end end local server = assert(socket.bind("localhost", 20000))