aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2018-07-17 13:04:06 +0000
committerNick Mathewson <nickm@torproject.org>2018-09-12 09:06:16 -0400
commitd8157097b42b6377d0cd83c758efce5825df83f2 (patch)
treea572dbcb5357e72e117e726692614630071a393e /src/core
parent3f34fc921c456a7f6bd7fc7401240aa4ae60d045 (diff)
downloadtor-d8157097b42b6377d0cd83c758efce5825df83f2.tar.gz
tor-d8157097b42b6377d0cd83c758efce5825df83f2.zip
Always include socket rebinding code
Diffstat (limited to 'src/core')
-rw-r--r--src/core/mainloop/connection.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c
index aeaff3784a..47a93e43a3 100644
--- a/src/core/mainloop/connection.c
+++ b/src/core/mainloop/connection.c
@@ -146,10 +146,11 @@
* EADDRINUSE.
* 2) If so, it will close the appropriate old listener connection and
* 3) Attempts bind()'ing the new listener socket again.
+ *
+ * Just to be safe, we are enabling listener rebind code on all platforms,
+ * to account for unexpected cases where it may be needed.
*/
-#if defined(__linux__) || defined(_WIN32)
#define ENABLE_LISTENER_REBIND
-#endif
static connection_t *connection_listener_new(
const struct sockaddr *listensockaddr,