mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
add result of accept
This commit is contained in:
@@ -43,7 +43,10 @@ if MODE == "agent" then
|
||||
|
||||
skynet.start(function ()
|
||||
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)
|
||||
|
||||
|
||||
@@ -407,9 +407,11 @@ function M.accept(socket_id, handle, protocol, addr)
|
||||
try_handle(ws_obj, "error")
|
||||
end
|
||||
else
|
||||
error(err)
|
||||
-- error(err)
|
||||
return false, err
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user