sh mainloop도 waitgroup에 추가
This commit is contained in:
@ -243,6 +243,7 @@ func (ws *WebsocketHandler) Start(ctx context.Context) {
|
|||||||
sh.callReceiver = &chainReceiver{chain: sh.receiverChain}
|
sh.callReceiver = &chainReceiver{chain: sh.receiverChain}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sh.connWaitGroup.Add(1)
|
||||||
go sh.mainLoop(ctx)
|
go sh.mainLoop(ctx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -312,6 +313,7 @@ func (ws *WebsocketHandler) LeaveRoom(region string, room string, accid primitiv
|
|||||||
|
|
||||||
func (sh *subhandler) mainLoop(ctx context.Context) {
|
func (sh *subhandler) mainLoop(ctx context.Context) {
|
||||||
defer func() {
|
defer func() {
|
||||||
|
sh.connWaitGroup.Done()
|
||||||
s := recover()
|
s := recover()
|
||||||
if s != nil {
|
if s != nil {
|
||||||
logger.Error(s)
|
logger.Error(s)
|
||||||
|
|||||||
Reference in New Issue
Block a user