do not use redirection in case of direct download after pending state

honor the allow_redirection flag after activating client from pending state.
master
tiptorrent development team 2022-02-08 15:50:15 +01:00
parent 6c910f2652
commit 2f834d6628
1 changed files with 1 additions and 1 deletions

View File

@ -380,7 +380,7 @@ bool tip_client_redirect(struct tip_client *cli)
struct tip_client_redirect *redir, *next; struct tip_client_redirect *redir, *next;
char addr[INET_ADDRSTRLEN + 1]; char addr[INET_ADDRSTRLEN + 1];
if (!max_redirect) if (!max_redirect || !cli->allow_redirect)
return false; return false;
inet_ntop(AF_INET, &cli->addr.sin_addr, addr, INET_ADDRSTRLEN); inet_ntop(AF_INET, &cli->addr.sin_addr, addr, INET_ADDRSTRLEN);