commit | 25ce8a26467df3c489fe86cfc7f9523faf3ad137 | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@google.com> | Thu Jul 15 17:45:16 2021 -0700 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Jul 26 17:15:52 2021 +0000 |
tree | 5279b23dd4cef200cc3362bd9a2f948dad7bd9cc | |
parent | be3219d066d3104be65a03ccdf8a8f28e7433c0c [diff] |
pw_stream: Set SO_REUSEADDR for sockets Closing a socket doesn't immediately free it. Sockets are held in a waiting state, even if the process that created them exits. This can cause errors when running a program multiple times in sequence if it tries to use the same socket address. Setting SO_REUSEADDR on a socket avoids this problem. Change-Id: I7d42a7db74adaad3bae8aeb56e0e1ff27ceeebed Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/54663 Commit-Queue: Wyatt Hepler <hepler@google.com> Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com> Reviewed-by: Keir Mierle <keir@google.com>
See our website: http://pigweed.dev