russelltg/srt-rs

Sender does not timeout

simon-fu opened this issue · 2 comments

  1. run examples
    • cargo run --release --example receiver
    • cargo run --release --example sender
  1. press Ctrl + C to stop receiving
  2. sender still keep sending data infinitely

my question is:
How do sender detect receiver closed or detect sending timeout ?

This is actually a bug--I've added a (currently disabled) unit test: 58cb7cf

@robertream If you have some time, you're more familiar with this code than me. I may give it a look at some point too

I will note that there are technically two issues here--the sender should timeout, but we should also send shutdown on ctrl+c (which, if the packet is not dropped, makes the closing instantaneous #112 )