fix: transport.UDPConn 新增了 WithUDPLinuxTimestamping(false) 开关
This commit is contained in:
@@ -13,10 +13,11 @@ import (
|
||||
func main() {
|
||||
listenAddr := flag.String("listen", ":9001", "UDP server listen address")
|
||||
logPath := flag.String("latency-log", "", "optional JSONL file path for latency timestamp logs")
|
||||
txTimestampDebugLogPath := flag.String("tx-ts-debug-log", "", "optional JSONL file path for TX errqueue debug records")
|
||||
txTimestampDebugLogPath := flag.String("tx-ts-debug-log", "", "optional JSONL file path for TX errqueue debug records; enables Linux UDP timestamping")
|
||||
flag.Parse()
|
||||
|
||||
hubOptions := make([]server.UDPOption, 0, 2)
|
||||
hubOptions = append(hubOptions, server.WithUDPLinuxTimestamping(false))
|
||||
if *logPath != "" {
|
||||
logger, err := latencylog.NewJSONLLogger(*logPath)
|
||||
if err != nil {
|
||||
@@ -31,6 +32,7 @@ func main() {
|
||||
log.Fatalf("create tx timestamp debug logger %s: %v", *txTimestampDebugLogPath, err)
|
||||
}
|
||||
defer logger.Close()
|
||||
hubOptions = append(hubOptions, server.WithUDPLinuxTimestamping(true))
|
||||
hubOptions = append(hubOptions, server.WithUDPTXTimestampDebugLogger(logger))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user