diff options
author | Felix Weinrank <info@weinrank.net> | 2015-12-29 16:56:41 +0100 |
---|---|---|
committer | Felix Weinrank <info@weinrank.net> | 2015-12-29 16:56:41 +0100 |
commit | 49a3476ad5e9e4a78db86d96fedda17a7dacdeb0 (patch) | |
tree | 5ad16baa111b93ced0fa563870a855918064a198 /programs/tsctp.c | |
parent | d6c555f1df8f206bebbdbff75912fd88f346f8aa (diff) | |
download | usrsctp-49a3476ad5e9e4a78db86d96fedda17a7dacdeb0.tar.gz |
Fix tsctp sender when using callbacks
Only checking for !done could cause a close before sending EOF.
https://github.com/sctplab/usrsctp/blob/master/programs/tsctp.c#L275
tsctp should wait until the last message has been sent.
Diffstat (limited to 'programs/tsctp.c')
-rw-r--r-- | programs/tsctp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/programs/tsctp.c b/programs/tsctp.c index f7975712..5521c6a2 100644 --- a/programs/tsctp.c +++ b/programs/tsctp.c @@ -747,7 +747,7 @@ int main(int argc, char **argv) } if (use_cb) { - while (!done && (messages < (number_of_messages - 1))) { + while (done < 2 && (messages < (number_of_messages - 1))) { #ifdef _WIN32 Sleep(1000); #else |