skynet.send发送到一个无效地址时,是否抛出错误或者提示更合理? #1951
chengf2018
started this conversation in
General
Replies: 3 comments
-
应该是担心行为变化破坏了兼容性。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
另外,C api 里的字符串名字已经不建议使用,请换 lua 层的支持。比如 uniqueservice 等。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
如果担心行为变化,我觉得可以只简单加上一行warning打印,以提示开发者改善代码 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
项目中遇到屏蔽旧服务,但是漏了注释其他服务的skynet.send,同时因为rpc服务实现上的一些问题,导致一直有协程被挂起,且内存一直上涨,同时由于是边缘逻辑,这个问题没法很快定位到。虽然这个问题的直接原因不是skynet.send的问题,但是如果skynet.send能有个明显的提示或者抛出错误,这种问题能更早发现,利于排错。
同时看到lua-skynet.c:299有个注释:
看来之前是有考虑到这个问题,但是实际却没有抛出错误或者提示。
目前看来抛出错误或者提示,更好?
Beta Was this translation helpful? Give feedback.
All reactions