mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
add result of accept
This commit is contained in:
@@ -43,7 +43,10 @@ if MODE == "agent" then
|
|||||||
|
|
||||||
skynet.start(function ()
|
skynet.start(function ()
|
||||||
skynet.dispatch("lua", function (_,_, id, protocol, addr)
|
skynet.dispatch("lua", function (_,_, id, protocol, addr)
|
||||||
websocket.accept(id, handle, protocol, addr)
|
local ok, err = websocket.accept(id, handle, protocol, addr)
|
||||||
|
if not ok then
|
||||||
|
print(err)
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
@@ -407,9 +407,11 @@ function M.accept(socket_id, handle, protocol, addr)
|
|||||||
try_handle(ws_obj, "error")
|
try_handle(ws_obj, "error")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
error(err)
|
-- error(err)
|
||||||
|
return false, err
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user