添加不等于nil判断

This commit is contained in:
walker 2024-01-23 10:43:40 +08:00
parent 8a028e6405
commit 9c5dde7b2e

View File

@ -214,8 +214,10 @@ func (w *world) Close() {
w.updateState(WorldClosed) w.updateState(WorldClosed)
return return
} }
w.cancel() if w.cancel != nil {
<-w.done w.cancel()
<-w.done
}
} }
// 执行待处理方法 // 执行待处理方法