mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Merge remote-tracking branch 'public/decouple_dir_request_failed'
This commit is contained in:
commit
fe8eb9b366
7
changes/bug17589
Normal file
7
changes/bug17589
Normal file
@ -0,0 +1,7 @@
|
||||
o Code simplificiation and refactoring:
|
||||
- When a direct directory request fails immediately on launch,
|
||||
instead of relaunching that request from inside the code that
|
||||
launches it, instead mark the connection for teardown. This
|
||||
change simplifies Tor's callback and prevents the directory-
|
||||
request launching code from invoking itself recursively.
|
||||
Closes ticket 17589.
|
@ -991,10 +991,7 @@ directory_initiate_command_rend(const tor_addr_t *_addr,
|
||||
switch (connection_connect(TO_CONN(conn), conn->base_.address, &addr,
|
||||
dir_port, &socket_error)) {
|
||||
case -1:
|
||||
connection_dir_request_failed(conn); /* retry if we want */
|
||||
/* XXX we only pass 'conn' above, not 'resource', 'payload',
|
||||
* etc. So in many situations it can't retry! -RD */
|
||||
connection_free(TO_CONN(conn));
|
||||
connection_mark_for_close(TO_CONN(conn));
|
||||
return;
|
||||
case 1:
|
||||
/* start flushing conn */
|
||||
|
Loading…
Reference in New Issue
Block a user