refactor: update timeout check in PacketReceipt to use time.Since to fix deadlock
Some checks failed
Bearer / scan (push) Successful in 7s
Go Build Multi-Platform / build (amd64, darwin) (push) Successful in 32s
Go Build Multi-Platform / build (amd64, linux) (push) Successful in 34s
Go Build Multi-Platform / build (arm, freebsd) (push) Successful in 33s
Go Build Multi-Platform / build (arm, windows) (push) Successful in 34s
Go Build Multi-Platform / build (arm64, windows) (push) Successful in 36s
Go Test Multi-Platform / Test (ubuntu-latest, arm64) (push) Successful in 1m2s
Go Revive Lint / lint (push) Successful in 51s
Run Gosec / tests (push) Failing after 1m19s
Go Test Multi-Platform / Test (ubuntu-latest, amd64) (push) Successful in 1m38s
Go Build Multi-Platform / build (amd64, freebsd) (push) Successful in 9m24s
Go Build Multi-Platform / build (amd64, windows) (push) Successful in 9m26s
Go Build Multi-Platform / build (arm, linux) (push) Successful in 9m24s
Go Build Multi-Platform / build (arm64, linux) (push) Successful in 9m22s
Go Build Multi-Platform / build (arm64, darwin) (push) Successful in 9m26s
Go Build Multi-Platform / build (arm64, freebsd) (push) Successful in 9m25s
Go Build Multi-Platform / Create Release (push) Has been skipped

This commit is contained in:
2025-12-30 11:31:51 -06:00
parent 53d418d753
commit 3cb375e7f2

View File

@@ -252,7 +252,7 @@ func (pr *PacketReceipt) checkTimeout() {
return
}
if !pr.IsTimedOut() {
if time.Since(pr.sentAt) <= pr.timeout {
pr.mutex.Unlock()
return
}