fix: 调整/tmp文件路径到/usr/local/omc
This commit is contained in:
@@ -119,7 +119,7 @@ func (s *Packet) LiveStart(taskNo, deviceName, filterBPF string, outputPCAP bool
|
||||
var f *os.File
|
||||
if outputPCAP {
|
||||
// 网管本地路径
|
||||
localFilePath := fmt.Sprintf("/tmp/omc/packet/%s.pcap", taskNo)
|
||||
localFilePath := fmt.Sprintf("/usr/local/omc/packet/%s.pcap", taskNo)
|
||||
if runtime.GOOS == "windows" {
|
||||
localFilePath = fmt.Sprintf("C:%s", localFilePath)
|
||||
}
|
||||
@@ -203,7 +203,9 @@ func (s *Packet) capturePacketSource(taskInfo *Task) {
|
||||
if packet == nil {
|
||||
continue
|
||||
}
|
||||
if packet.Metadata().Timestamp.Before(time.Now()) {
|
||||
// 如果延迟超过1秒跳过
|
||||
timeDiff := time.Since(packet.Metadata().Timestamp)
|
||||
if timeDiff > time.Second {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user