fix
This commit is contained in:
parent
c80cb7bc9b
commit
e800b18325
|
@ -273,16 +273,16 @@ func sendToOutChanByUserIndex(userId, guestId int64, message []byte) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 消费用户索引创建/删除/发送消息中的任务数据
|
// 消费用户索引创建/删除/发送消息中的任务数据
|
||||||
func ConsumeUserPoolData(ctx context.Context) {
|
func ConsumeUserConnPoolCtlChanData(ctx context.Context) {
|
||||||
defer func() {
|
defer func() {
|
||||||
if err := recover(); err != nil {
|
if err := recover(); err != nil {
|
||||||
logx.Error("consumeUserPoolData panic:", err)
|
logx.Error("ConsumeUserConnPoolCtlChanData panic:", err)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
panic("ConsumeUserPoolData ctx deadline")
|
panic("ConsumeUserConnPoolCtlChanData ctx deadline")
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
for {
|
for {
|
||||||
|
|
|
@ -36,7 +36,7 @@ func main() {
|
||||||
//消费公共通知队列的数据
|
//消费公共通知队列的数据
|
||||||
go logic.ConsumeCommonCacheData(ctx1)
|
go logic.ConsumeCommonCacheData(ctx1)
|
||||||
//消费用户索引创建/删除/发送消息中的任务数据
|
//消费用户索引创建/删除/发送消息中的任务数据
|
||||||
go logic.ConsumeUserPoolData(ctx1)
|
go logic.ConsumeUserConnPoolCtlChanData(ctx1)
|
||||||
fmt.Printf("Starting server at %s:%d...\n", c.Host, c.Port)
|
fmt.Printf("Starting server at %s:%d...\n", c.Host, c.Port)
|
||||||
server.Start()
|
server.Start()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user