-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose stop tracker timeout in Advanced Settings (GUI + WebUI) #11834
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general:
-
You should try to make sure the new code for this setting appears at roughly in the same order relative to other settings in all relevant source files. This is not the case at the moment.
For example, in
src/base/bittorrent/session.cpp
, you put the new code betweenm_asyncIOThreads...
andm_filePoolSize...
but insrc/base/bittorrent/session.h
you put it betweenRefreshInterval...
andPreallocationEnabled...
.
It is just a matter of fixing the order. -
There are a couple of places where indentation is bad/missing.
EDIT: it appears most of the indentation problems are due to the use to tab instead of spaces -
There are a couple of places where you named variables/function names etc with
snake_case
when they should have beencamelCase
I am skeptical about the need of exposing this setting. It seems a bit unnecessary. Can't it be set to a sane default? |
There is already ongoing discussion about whether or not the default value for this setting should change, take a look: #11807 Regardless of the final decision on that matter, I think it is already clear that there are different enough use cases that warrant this setting be configurable. It is not a one-size-fits-all. |
Thanks for your review. I tried to fix the mentioned issues as best as I could.
A sane default is necessay but this will allow user to tweak the settings to their use case. |
No problem. Only a few minor things left. I will post the next review shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You still need to move a couple of code snippets to the correct place to be 100% consistent.
Additionally, you forgot the libtorrent documentation help links in the settings (both webUI and gui).
Looks good. Now you have to squash the commits before this can be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The period shouldn't appear at the end of commit message subject (so-called commit title).
Fixed. Should the default value remain at 1 s? |
I have no strong preferences about it (if it works in general case). |
@An0n666 |
Exposing the settings for stop_tracker_timeout so user can set it to higher value to ensure tracker announces go through when client is exited/torrent is paused.