You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[:00000014] [error][.watchdog.service][2023-03-15 19:35:17] <@../src/ndgame/watchdog/handler.lua:310>
websocket.accept err ../depends/skynet/lualib/http/websocket.lua:82: assertion failed!
stack traceback:
[C]: in function 'assert'
../depends/skynet/lualib/http/websocket.lua:82: in upvalue 'read_handshake'
../depends/skynet/lualib/http/websocket.lua:254: in function <../depends/skynet/lualib/http/websocket.lua:252>
[C]: in function 'xpcall'
../depends/skynet/lualib/http/websocket.lua:412: in function 'http.websocket.accept'
../src/ndgame/watchdog/handler.lua:307: in function 'watchdog.handler.wsData'
[C]: in function 'skynet.pcall'
../src/common/base/class.lua:15: in function <../src/common/base/class.lua:10>
[C]: in function 'xpcall'
../src/common/base/dispatch.lua:61: in function 'dispatch.dispatchMessage'
[C]: in function 'skynet.pcall'
../src/common/base/class.lua:15: in upvalue 'f'
../depends/skynet/lualib/skynet.lua:281: in function <../depends/skynet/lualib/skynet.lua:253>
客户端长时间挂着,会出现这个问题
我现在的修改是这样:
local function resolve_accept(self, options)
try_handle(self, "connect")
local ok, code, err, url = pcall(read_handshake, self, options and options.upgrade)
--这里增加报错后处理
if not ok then
try_handle(self, "close")
return
end
不知道大家有没有遇到过
The text was updated successfully, but these errors were encountered:
我是这样预防的。。(主要是不想去魔改底层代码)
local ok, errmsg = websocket.accept(fd, handler, protocol, addr)
if not ok then
skynet.error(string.format("websocket.accept (fd: %s) returns error: %s", fd, errmsg))
websocket.close(fd) -- 这里不一定直接关闭fd,可以回调到业务层之后的某个地方再处理
end
[:00000014] [error][.watchdog.service][2023-03-15 19:35:17] <@../src/ndgame/watchdog/handler.lua:310>
websocket.accept err ../depends/skynet/lualib/http/websocket.lua:82: assertion failed!
stack traceback:
[C]: in function 'assert'
../depends/skynet/lualib/http/websocket.lua:82: in upvalue 'read_handshake'
../depends/skynet/lualib/http/websocket.lua:254: in function <../depends/skynet/lualib/http/websocket.lua:252>
[C]: in function 'xpcall'
../depends/skynet/lualib/http/websocket.lua:412: in function 'http.websocket.accept'
../src/ndgame/watchdog/handler.lua:307: in function 'watchdog.handler.wsData'
[C]: in function 'skynet.pcall'
../src/common/base/class.lua:15: in function <../src/common/base/class.lua:10>
[C]: in function 'xpcall'
../src/common/base/dispatch.lua:61: in function 'dispatch.dispatchMessage'
[C]: in function 'skynet.pcall'
../src/common/base/class.lua:15: in upvalue 'f'
../depends/skynet/lualib/skynet.lua:281: in function <../depends/skynet/lualib/skynet.lua:253>
客户端长时间挂着,会出现这个问题
我现在的修改是这样:
local function resolve_accept(self, options)
try_handle(self, "connect")
local ok, code, err, url = pcall(read_handshake, self, options and options.upgrade)
--这里增加报错后处理
if not ok then
try_handle(self, "close")
return
end
不知道大家有没有遇到过
The text was updated successfully, but these errors were encountered: