mirror of
https://github.com/oneclickvirt/backtrace.git
synced 2026-11-24 23:39:41 +08:00
fix:修复panic恢复机制
This commit is contained in:
1 parent
026f9784e4
commit
ce8555f149
11 files changed
+94
-21
No files matched your search
+4
-1
@@ -233,7 +233,10 @@ func (t *Tracer) serveData(from net.IP, b []byte) error {
|
||||
return err
|
||||
}
|
||||
if msg.Type == ipv4.ICMPTypeEchoReply {
|
||||
echo := msg.Body.(*icmp.Echo)
|
||||
echo, ok := msg.Body.(*icmp.Echo)
|
||||
if !ok || echo == nil {
|
||||
return errUnsupportedProtocol
|
||||
}
|
||||
return t.serveReply(from, &packet{from, uint16(echo.ID), 1, time.Now()})
|
||||
}
|
||||
b = getReplyData(msg)
|
||||
|
||||
Reference in new issue
Block a user