mirror of
https://github.com/safing/portmaster
synced 2025-09-04 19:49:15 +00:00
Add review changes
This commit is contained in:
parent
7a83e772f4
commit
1b45659f47
2 changed files with 5 additions and 5 deletions
|
@ -25,18 +25,18 @@ func Start() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var ch = Packets
|
var inputPackets = Packets
|
||||||
if packetMetricsDestination != "" {
|
if packetMetricsDestination != "" {
|
||||||
go metrics.writeMetrics()
|
go metrics.writeMetrics()
|
||||||
ch = make(chan packet.Packet)
|
inputPackets = make(chan packet.Packet)
|
||||||
go func() {
|
go func() {
|
||||||
for p := range ch {
|
for p := range inputPackets {
|
||||||
Packets <- tracePacket(p)
|
Packets <- tracePacket(p)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
return start(ch)
|
return start(inputPackets)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stop starts the interception.
|
// Stop starts the interception.
|
||||||
|
|
|
@ -18,7 +18,7 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
flag.StringVar(&packetMetricsDestination, "packet-metrics", "", "Write packet metrics")
|
flag.StringVar(&packetMetricsDestination, "write-packet-metrics", "", "Write packet metrics to the specified file")
|
||||||
}
|
}
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
Loading…
Add table
Reference in a new issue