Skip to content

Commit

Permalink
Last unexpected service behavior (#25)
Browse files Browse the repository at this point in the history
* Update bin.go

Included length of timeoutQueue check in bin.go before ending

* Update stateMap.go

Included Dport in constructKey to account for repeat sends to same IP.

* Update concurrentMap.go

Included functionality for checking map updates.

* Update bin.go

Included functionality for checking and resetting updates to check if LZR is in an infinite loop.

* Update bin.go

Fixed last unexpected service issue. Included loop check for timeout services so LZR doesn't stop early.
  • Loading branch information
ianshih22856 authored Jan 27, 2025
1 parent 454fb27 commit 98201d8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bin/bin.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func LZRMain() {
incomingDone.Add(options.Workers)
done := false
writing := false
timeoutDone := true

// record to file
go func() {
Expand Down Expand Up @@ -167,6 +168,7 @@ func LZRMain() {
timeoutIncoming <- input
continue
}
timeoutDone = false
lzr.HandleTimeout( options, input, &ipMeta, timeoutQueue, retransmitQueue, writingQueue )
ipMeta.FinishProcessing( input )
}
Expand All @@ -189,7 +191,17 @@ func LZRMain() {
//closing file
f.F.Flush()
t := time.Now()
startTime := time.Now()
timeoutDone = true
// 5 second repeated check if any services have called handleTimeout
for time.Since(startTime) < time.Duration(5)*time.Second {
if !(timeoutDone) {
startTime = time.Now()
timeoutDone = true
}
}
elapsed := t.Sub(start)

lzr.Summarize( elapsed )
return
}
Expand Down

0 comments on commit 98201d8

Please sign in to comment.