fix: client 包错误类型转换错误问题处理
This commit is contained in:
parent
da68945f7e
commit
034ca174b6
|
@ -1,6 +1,7 @@
|
|||
package client
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/kercylan98/minotaur/utils/concurrent"
|
||||
"sync"
|
||||
)
|
||||
|
@ -155,7 +156,11 @@ func (slf *Client) writeLoop(wait *sync.WaitGroup) {
|
|||
}()
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
slf.Close(err.(error))
|
||||
err, isErr := err.(error)
|
||||
if !isErr {
|
||||
err = fmt.Errorf("%v", err)
|
||||
}
|
||||
slf.Close(err)
|
||||
}
|
||||
}()
|
||||
wait.Done()
|
||||
|
|
Loading…
Reference in New Issue