From 10f94a3fd49fed0509041f9666bc8fedf2b224d5 Mon Sep 17 00:00:00 2001 From: Lewin Bormann Date: Thu, 13 Jun 2019 18:33:50 +0200 Subject: [PATCH] docs(Authenticator): Update doc about hyper client as in #93. --- src/authenticator.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/authenticator.rs b/src/authenticator.rs index 928a32c..9808599 100644 --- a/src/authenticator.rs +++ b/src/authenticator.rs @@ -64,12 +64,16 @@ where /// * `secret` - usually obtained from a client secret file produced by the /// [developer console][dev-con] /// * `delegate` - Used to further refine the flow of the authentication. - /// * `client` - used for all authentication https requests + /// * `client` - used for all authentication https requests. /// * `storage` - used to cache authorization tokens tokens permanently. However, /// the implementation doesn't have any particular semantic requirement, which /// is why `NullStorage` and `MemoryStorage` can be used as well. /// * `flow_type` - the kind of authentication to use to obtain a token for the /// required scopes. If unset, it will be derived from the secret. + /// + /// NOTE: It is recommended to use a client constructed like this in order to prevent functions + /// like `hyper::run()` from hanging: `let client = hyper::Client::builder().keep_alive(false);`. + /// Due to token requests being rare, this should not result in a too bad performance problem. /// [dev-con]: https://console.developers.google.com pub fn new( secret: &ApplicationSecret,