-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: Use
Duration
in config and centralise defaults
Rather than using names and documentation to specify the units for durations, we can use the `Duration` type which lets callers choose whatever works best for them. It also means we no longer have to convert to `Duration` internally, simplifying some code. Additionally, the default values for duration constants have been centralised under `config`, which has been made public so users can see them in documentation. BREAKING CHANGE: The duration fields in config have all changed: - `idle_timeout_msec` is renamed `idle_timeout` and is now an `Option<Duration>`. - `keep_alive_interval_msec` is renamed `keep_alive_interval` and is now an `Option<Duration>`. - `upnp_lease_duration` is now an `Option<Duration>`. - `retry_duration_msec` is renamed `min_retry_duration` and is now an `Option<Duration>`.
- Loading branch information
Showing
9 changed files
with
118 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.