You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Sender and receiver can hang forever (no read deadline, no overall timeout) #21
Several failure paths never terminate, on both ends:
pkg/sender.go:167 waitingMissing reads with no deadline — the SetReadDeadline call is commented out. If all done packets are lost (plain UDP loss), or the receiver dies, the sender blocks in conn.Read forever.
the sender's resend goroutine prints . every 3 s indefinitely (pkg/sender.go:100) with no bound,
the receiver re-sends miss for every missing index every second in a for buffer.Size() > 0 loop with no cap and no timeout (pkg/waiter.go:151) — if the sender died, it spins forever; WriteTo errors are ignored,
requestDone (pkg/waiter.go:160) retries in an empty-bodied for err := ...; err != nil; {} loop without bound.
Net effect: a single lost done or a crashed peer leaves both processes running forever with no way to finish or fail.
Suggested fix
restore the read deadline in waitingMissing and add an idle timeout on both ends,
add an overall transfer deadline / retry budget after which the CLI reports failure and exits non-zero,
propagate context cancellation so Ctrl-C is clean.
Activity