mirror of
https://github.com/soypat/lneto.git
synced 2026-09-03 13:29:02 +00:00
testing.B.Loop() standardization and StackAsync.Debug improvement (#156)
* testing.B.Loop() standardization and StackAsync.Debug heap debugging improvement * apply @MDr164 fixes * @MDr164 great suggestions to prevent panic and print correct mallocs
This commit is contained in:
@@ -2,7 +2,11 @@
|
||||
|
||||
package xnet
|
||||
|
||||
import "os"
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/soypat/lneto/internal"
|
||||
)
|
||||
|
||||
var _pcap CapturePrinter
|
||||
|
||||
@@ -14,4 +18,7 @@ func init() {
|
||||
|
||||
func debugPacket(msg string, b []byte) {
|
||||
_pcap.PrintEthernet(msg, b)
|
||||
if internal.HeapAllocDebugging {
|
||||
internal.LogAllocs(msg)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user