Skip to content

Commit 2f63253

Browse files
committed
🎨 优化代码结构
1 parent be7e813 commit 2f63253

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

main.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func main() {
207207
Handle(func(ctx *zero.Ctx) {
208208
ctx.SendChain(message.Text(kanban.Kanban()))
209209
})
210-
zero.Run(
210+
zero.RunAndBlock(
211211
zero.Config{
212212
NickName: append([]string{*adana}, nicks...),
213213
CommandPrefix: *prefix,
@@ -216,7 +216,6 @@ func main() {
216216
SuperUsers: flag.Args(), // 通过命令行参数的方式添加主人账号
217217
Driver: []zero.Driver{driver.NewWebSocketClient(*url, *token)},
218218
},
219+
process.GlobalInitMutex.Unlock,
219220
)
220-
process.GlobalInitMutex.Unlock()
221-
select {}
222221
}

0 commit comments

Comments
 (0)