关于skynet.timeout()的问题 #1840
ericzhanchina
started this conversation in
General
Replies: 2 comments
-
而且从日志看,如果socket断开了,msgagent的afk方法会被调用两次? |
Beta Was this translation helpful? Give feedback.
0 replies
-
封装一下就能取消了 https://github.com/huahua132/skynet_fly/blob/master/lualib/timer.lua |
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
-
现在如果服务器收到了afk,玩家在线设置为false,我会使用skynet.timeout做一个定时任务,20分钟之后,会踢掉这个玩家释放链接。但是如果玩家链接上来了且发了协议会将玩家的在线与否设置为true,如果玩家链接上来了,但是没发协议,这样还是会被这个定时任务给踢掉,所以我想问一下,这个skynet.timeout启动的定时任务是否有办法取消?
Beta Was this translation helpful? Give feedback.
All reactions