From 01cf27edb5c9c7c8a64073824f83fa5d23a294eb Mon Sep 17 00:00:00 2001 From: xzb <223@qq.com> Date: Wed, 29 Nov 2023 14:10:25 +0800 Subject: [PATCH] btm --- third_party/can_btm/balise_btm.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/third_party/can_btm/balise_btm.go b/third_party/can_btm/balise_btm.go index e069a47..9268d65 100644 --- a/third_party/can_btm/balise_btm.go +++ b/third_party/can_btm/balise_btm.go @@ -109,6 +109,11 @@ func (s *btmCanetClient) Stop() { } } func (s *btmCanetClient) handleCanetFrames(cfs []byte) { + defer func() { + if e := recover(); e != nil { + slog.Debug(fmt.Sprintf("handleCanetFrames异常[%s]", e)) + } + }() //一个cannet 帧 13字节 if len(cfs) > 0 && len(cfs)%13 == 0 { cfSum := len(cfs) / 13