关于热更新一个模块功能 #1740
ericzhanchina
started this conversation in
General
关于热更新一个模块功能
#1740
Replies: 1 comment 7 replies
-
大概率是 codecache 问题。加载 local cache = require "skynet.codecache"
cache.mode "OFF" -- turn off codecache, because CMD.new may load data file ps: 理解清楚怎么回事再设置吧= =,免得把 codecache 都给关了。 |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
服务器针对部分模块功能的热更新,我用的是云风提供的reload功能,比如有一个模块mod.lua,可以针对这个模块的方法进行热更新,上传一个mod_update.lua到服务器,执行热更新后生效,后续其他的协议都是按照mod_update的逻辑执行的,然后问题是,如果我再需要修改mod.lua的某个方法,同样上传mod_update.lua,执行热更新,就无效了,从日志看,新的代码并不会被执行,还是老的mod_update再执行,这个是什么问题呢?
Beta Was this translation helpful? Give feedback.
All reactions