优化recover

This commit is contained in:
duanhf2012
2020-04-01 21:08:23 +08:00
parent 7fdfbb587e
commit 269a999b58
4 changed files with 26 additions and 15 deletions

View File

@@ -124,7 +124,7 @@ func (slf *Service) GetName() string{
func (slf *Service) Release(){
defer func() {
if r := recover(); r != nil {
buf := make([]byte, 40960)
buf := make([]byte, 4096)
l := runtime.Stack(buf, false)
err := fmt.Errorf("%v: %s", r, buf[:l])
log.Error("core dump info:%+v\n",err)