Replies: 8 comments
-
我修改simplewebsocket 重现了这个问题 代码我放在附件里面了(我用的是ubuntu)
…------------------ 原始邮件 ------------------
发件人: "cloudwu/skynet" ***@***.***>;
发送时间: 2021年10月7日(星期四) 中午12:46
***@***.***>;
***@***.******@***.***>;
主题: Re: [cloudwu/skynet] socket 关于异常错误 没有打印的问题 (Discussion #1483)
需要测试代码
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Beta Was this translation helpful? Give feedback.
-
没有附件,你可以尝试给一个解决方案。 |
Beta Was this translation helpful? Give feedback.
-
local function try_handle(self, method, ...)
local handle = self.handle
local f = handle and handle[method]
if f then
---加上pcall 是因为 lssues#1482
local ok,error = pcall(f,self.id, ...)
assert(not ok,error)
--f(self.id, ...)
end
end
from lualib/http/websocket.lua 我将这里改了一下,有错误输出了 我不懂为什么 f(self.id, ...) 调用发生错误会导致不输出错误 (所以没有根本的解决问题)
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2021年10月7日(星期四) 晚上6:48
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [cloudwu/skynet] socket 关于异常错误 没有打印的问题 (Discussion #1483)
没有附件,你可以尝试给一个解决方案。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Beta Was this translation helpful? Give feedback.
-
是 lualib/http/websocket.lua line:423 error(err) 这里句代码屏蔽掉了 (我不知道为什么要屏蔽掉-问题确认了)
…------------------ 原始邮件 ------------------
发件人: "cloudwu/skynet" ***@***.***>;
发送时间: 2021年10月7日(星期四) 晚上6:48
***@***.***>;
***@***.******@***.***>;
主题: Re: [cloudwu/skynet] socket 关于异常错误 没有打印的问题 (Discussion #1483)
没有附件,你可以尝试给一个解决方案。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Beta Was this translation helpful? Give feedback.
-
如果你不会用 email , 请在 web 界面编辑清楚。 |
Beta Was this translation helpful? Give feedback.
-
不好意思是因为 lualib/http/websocket.lua |
Beta Was this translation helpful? Give feedback.
-
因为这个函数有返回 false, err 。你应该检查其返回值。 |
Beta Was this translation helpful? Give feedback.
-
如果是在 socket.accept(fd,handle,"ws",addr) 之后因为自己 handle模块的问题导致异常错误,
我希望是会抛出一个错误日志,然后断开连接
但是这个时候是直接会断开连接。 这个时候我如果在自己的模块出错前加一个print 打印 就会抛出错误。
感觉是上一个动作是socket 的动作 然后中间没有打印直接然后遇到异常 这个时候会导致没有异常日志
Beta Was this translation helpful? Give feedback.
All reactions