[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Make sure we're removing conn from old_conns *once*
commit 9d886185c1783cb16a4bc94cf12f78481d5b985d
Author: rl1987 <rl1987@xxxxxxxxxxxxxxxx>
Date: Wed Oct 3 15:45:48 2018 +0300
Make sure we're removing conn from old_conns *once*
---
src/core/mainloop/connection.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c
index 5ef140b6b..ef8c60a3d 100644
--- a/src/core/mainloop/connection.c
+++ b/src/core/mainloop/connection.c
@@ -2762,6 +2762,11 @@ retry_listener_ports(smartlist_t *old_conns,
const port_cfg_t *found_port = NULL;
/* Okay, so this is a listener. Is it configured? */
+ /* That is, is it either: 1) exact match - address and port
+ * pair match exactly between old listener and new port; or 2)
+ * wildcard match - port matches exactly, but *one* of the
+ * addresses is wildcard (0.0.0.0 or ::)?
+ */
SMARTLIST_FOREACH_BEGIN(launch, const port_cfg_t *, wanted) {
if (conn->type != wanted->type)
continue;
@@ -2805,6 +2810,7 @@ retry_listener_ports(smartlist_t *old_conns,
SMARTLIST_DEL_CURRENT(launch, wanted);
SMARTLIST_DEL_CURRENT(old_conns, conn);
+ break;
}
#endif
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits