优化本结点与跨结点Rpc结构&简化原始Rpc接口

This commit is contained in:
duanhf2012
2023-01-31 13:50:41 +08:00
parent 541abd93b4
commit a7c6b45764
12 changed files with 549 additions and 460 deletions

View File

@@ -273,6 +273,11 @@ func (m *Module) SafeNewTicker(tickerId *uint64, d time.Duration, AdditionData i
}
func (m *Module) CancelTimerId(timerId *uint64) bool {
if timerId==nil || *timerId == 0 {
log.SWarning("timerId is invalid")
return false
}
if m.mapActiveIdTimer == nil {
log.SError("mapActiveIdTimer is nil")
return false
@@ -280,7 +285,7 @@ func (m *Module) CancelTimerId(timerId *uint64) bool {
t, ok := m.mapActiveIdTimer[*timerId]
if ok == false {
log.SError("cannot find timer id ", timerId)
log.SStack("cannot find timer id ", timerId)
return false
}