sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Block comments inside of callback function body should not be emitted
Labels: Bug,Domain: Comment Emit

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.5.1

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

+ Block comment
+ Function body
+ Emit

**Code**

```ts

export const selectClause = tsql.SelectClauseUtil.select(
    fromClause,
    undefined,
    columns => (
        /**
         * The two `SelectsT` have different `usedRef` but the first
         * is a subset of the second.
         */
        Math.random() > 0.5 ?
        [
            tsql.eq(columns.myTable.myTableId, columns.myTable.myTableId).as("eq")
        ] :
        [
            tsql.eq(columns.myTable.myTableId, columns.otherTable.otherTableId).as("eq")
        ]
    )
)

```

**Expected behavior:**

```ts
export declare const selectClause: [tsql.IExprSelectItem<{
    mapper: tm.Mapper<unknown, boolean>;
    tableAlias: "__aliased";
    alias: "eq";
    usedRef: tsql.IUsedRef<never>;
}>];

```

**Actual behavior:**

```ts
export declare const selectClause: [tsql.IExprSelectItem<{
    mapper: tm.Mapper<unknown, boolean>; /**
     * The two `SelectsT` have different `usedRef` but the first
     * is a subset of the second.
     */
    tableAlias: "__aliased";
    alias: "eq";
    usedRef: tsql.IUsedRef<never>;
}>];

```

**Playground Link:** 

### TODO Minimal repro

**Related Issues:**

### TODO
Repository: rust
Issue: Better error message for 'is private'
Labels: C-enhancement,A-diagnostics,A-visibility,T-compiler,A-suggestion-diagnostics

```
mod foo {
    use bar::A;
    
    mod bar {
        pub struct A {}
    }
}

use foo::A;

fn main() {}
```

Produces the error:
```
error[E0603]: struct `A` is private
 --> src/main.rs:9:10
  |
9 | use foo::A;
  |          ^
```
[playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=3d060124806bfade3ad4432abfef86b9)

It would be great if the error message said _why_ the pub struct 'A' is private.
For example something like this: 
```
error[E0603]: struct `A` is private because it is not exported by module foo
```

This would remove the head scratching time as one looks at the definition of the struct and sees the `pub` visibility modifier.
Repository: electron
Issue: the input-box lose focus after call window.alert('...')
Labels: platform/windows,bug :beetle:,5-0-x,6-1-x,10-x-y,has-repro-gist,13-x-y,14-x-y,16-x-y

<!--  As an open source project with a dedicated but small maintainer team, it can sometimes take a long time for issues to be addressed so please be patient and we will get back to you as soon as we can.
-->

### Preflight Checklist
<!-- Please ensure you've completed the following steps by replacing [ ] with [x]-->

* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

### Issue Details

* **Electron Version:**
  * 5.0.10、6.0.4
* **Operating System:**
  * Windows 10 (1803)
* **Last Known Working Electron version:**
  * no

### Expected Behavior
can get focus on input box and enter text normally

### Actual Behavior
When called the alert('xxx') and close the message box, 
the input-box on the page has lost focus and can't enter any text into it.
Then, I focus to any other window, and focus back to my window(the page), the focus is back.

### To Reproduce
put &lt;input &gt; in the page, call window.alert('xxx').

### Screenshots
![image](https://user-images.githubusercontent.com/2647956/63753552-dea60900-c8e5-11e9-86da-a8e250d6b70d.png)


### Additional Information
<!-- Add any other context about the problem here. -->
Repository: rust
Issue: rustdoc: add a way to link relative to the root of the docs
Labels: T-rustdoc,C-feature-request

In a recent documentation change, we were unable to create a link to a function in `std` and had to resort to linking to online documentation.

@eddyb described it best:
> `../std` won't work in `core::hint/std::hint` and `../../std` won't work in `test`

Thus the link checker can't be satisfied.

For more info, see:
https://github.com/rust-lang/rust/pull/62891#issuecomment-524417564
Repository: flutter
Issue: [webview_flutter] Add a callback for unsupported content types
Labels: c: new feature,customer: crowd,p: webview,customer: google,package,team-ecosystem,P2,triaged-ecosystem
Repository: flutter
Issue: [ google_maps_flutter ] polylines encoding/decoding algorithms
Labels: c: new feature,p: maps,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

I am currently using google_maps_flutter and it works great.

Would it be possible to add some utility function to help dealing with the encoded Polylines.

So you could easily deal with the direction API

```
"overview_polyline":{
"points": "ameiHomjM|sDo}E~}ArbIxuDe_Av_Cv]fyChqCzkC~u@zqAjLjs@ojAn~Ac{AlaAwtBv{HirM~~F_dFpiBkhChjEmbBdzHsuAz_Gc~B|vFknB|gB_i@~qC{`C~kF{nFj`DghJhaH_vKrsFq{HjlEinKdtEqfJnuDenPtgGmkMz`HclJ~tPguU~oBo|FpZoqG~jGup^b{@mnKfpAmoHblC}hAdbCadDznDedMz`Eup@hqDw_Ij}CigLd|D{bHbgBubAlwCcNjtCaf@lnB{bCnfDqfEtnFqaFxUwgPvnDslSriDweOnhCsgF~zD}oFbuDo~H`pDozJ~cEykEndF{fAxdCucItgFatGhmByyIfhCc`DpfCcu@frE}n@zfBc}ArA{zBfjEaxCf~@i_DIehD`lBsaErjAiiCbmDblAhxJ|tEhkI|_@bxI{gAdlFx{@pdDqCfoPiqChzJuwBxhDeoEzkCdT~{BipBnsCaS~fKvyFplJpdCzaJ`cEz{EvtD~kHdPx{CcWjkHxjCz_OrgBxnHxbCp|Bl{@lzCwNd|Cqr@t_Cb~@pxCvl@laCcb@pkLipBfcK}tFbbCi\\nRu_Ap`B{oCjUwv@xmBxxAfcEm_Ctx@i|@|eCzAvlIb~ExzAbtAzqBya@d_FmcFv]iiB`vAoh@~lCljC|eDni@zmHps@xvCfi@~cD~mAvzG}c@lfFaoAdvHwqAxgFylEhcEmaBlgIsdApaFvlBxtA|~@p}A{m@ppIrClrFaw@ltBuc@rsBjo@n~H~hBxuFzNb|ElqAtlFtaIxtFvfAlxI_`AlsKbUxlF}cBldCjGvxHp_GplHpsApvHpyCjzJ{u@b_Fwu@jnFbcD~wCbsAtaCqmA`{Bi{@z`D}zDhzIsgHb}@{gHf~D{hDpjHwc@nxI}r@`nEwbBlyE_Cj_CgfA~dDmrIdzFmnIxzCe`Aj|CqvDrqD}gBpxCuY~jHc]nwJygIndBgmFjyB_sDphBacByDmpExJqtGroAkdEjoB}uLxy@gvHbu@qlIhzAgqA~m@olD|WcjJr]gqMgk@_fJvo@qmJzwCw|OxwAckGx}AmxPgFstKzi@_{Hho@c~I`JuzGrJ}pKnScqEqZ{iHugAizJik@smBunBcSyyAsmIeeAejHd@w~Kzj@gaKqxBmgGupAbJ}y@q|A}uDegDiaBc]Sk{C_L_mB`x@qiA`Hc{Hgc@cqGuaB_yBgfCo_EkUmpEarBseFwv@upGidDcfDauCwzCkp@c{GeLuoBmoB_jCkjD}yEoW{M"
},
```
Repository: nvm
Issue: Make nvm list command more interactive
Labels: feature requests

Currently we can select the node version with the command `nvm use <version>`. 
Entering the version is time consuming. Also you have to check twice if it is the right version. Very often the command `nvm list` is a precondition for using the command to select the version.

My enhancement would be to make the `nvm list` command more interactive. So that we can just select the right version by pressing the up and down arrows.
Repository: go
Issue: cmd/link: "readSym out of sync" flake
Labels: Builders,NeedsInvestigation,compiler/runtime

Observed in the `darwin-amd64-10_14` in https://build.golang.org/log/2c4dfc954904829f5c15825b108b5d21e2108fe4:
```
# go/token.test
2019/08/26 10:19:55 readSym out of sync
ok  	go/printer	0.213s
ok  	go/scanner	0.013s
FAIL	go/token [build failed]
```

That line comes from here: 
https://github.com/golang/go/blob/1a423bec00915fd45dc6f7ee67860abbfc2bbdb2/src/cmd/link/internal/objfile/objfile.go#L213
Repository: TypeScript
Issue: Union types and overloads acts a bit weirdly
Labels: Bug

## Acknowledgement
I have asked the question on Gitter and most of the users believe it's a bug and I have search for existing issues and didn't found any.

## Issue
Let's start with the code. [Playground link](https://www.typescriptlang.org/play/index.html#code/CYUwxgNghgTiAEkoGdnwGIHtPwN4CgBIABwFcAjCASzHjmAAoBKALngBcALK5IsymnRCN2IAB7s2ydjCoA7AOat402YvwBffPlBI4iaKngAhWHj4VqteszZceFgdeENREqTPlKPahZu1gmHLS8ABm2GxYOAA+JmYAvPByIADuGNjM+IHB7PBQ8InhmAB0NgDkbuxlTEA)

```ts
declare class Foo {
	public red(): this
	public red(text: string): string
}

declare class Bar {
	public red(): this
	public red(text: string): string
}

const foo: Foo | Bar = new Foo()
const a = foo.red('text')
```

In the above code, I expect the variable `a` to be a string. However, it is `string | Bar`.

Now, things get even weird when I replace `string` with `object` in the return types of `red` method.

```ts
declare class Foo {
	public red(): this
	public red(text: string): object
}

declare class Bar {
	public red(): this
	public red(text: string): object
}

const foo: Foo | Bar = new Foo()
const a = foo.red('text')
```

Now suddenly, `a` is an `object` (which is correct)
Repository: bitcoin
Issue: Comply with the XDG Base Directory Specification
Labels: Brainstorming

Should `$XDG_DATA_HOME` be taken into account when determining the default datadir location?

http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

Reopen of issue #1390
Repository: flutter
Issue: Read flutter_build_log_pipe/pipe_to_stdout with a stream
Labels: team,c: crash,platform-ios,tool,P3,team-ios,triaged-ios

Here: https://github.com/flutter/flutter/blob/398ac1f6c892bc3638c08f1aef0bfbd99d8418c3/packages/flutter_tools/lib/src/ios/mac.dart#L412

`listenToScriptOutputLine()` repeatedly opens a file and reads available lines from a named pipe using `readAsLines()`. Internally, `readAsLines()` opens a `RandomAccessFile`, which consumes a file descriptor. When the pipe is temporarily exhausted, `readAsLines()` issues an asynchronous operation to close the file, but the `Future` returned by `readAsLines()` is completed before the asynchronous `close()` can complete. This is a transient file descriptor leak, for which we have observed crashes in the wild:

```
FileSystemException: FileSystemException: Cannot open file, path = '[...]/flutter_build_log_pipe.sVPzdI/pipe_to_stdout' (OS Error: Too many open files in system, errno = 23)
  | at _File.open.<anonymous closure> | (file_impl.dart:364 )
  | at _rootRunUnary | (zone.dart:1132 )
  | at _CustomZone.runUnary | (zone.dart:1029 )
  | at _FutureListener.handleValue | (future_impl.dart:137 )
  | at Future._propagateToListeners.handleValueCallback | (future_impl.dart:678 )
  | at Future._propagateToListeners | (future_impl.dart:707 )
  | at Future._completeWithValue | (future_impl.dart:522 )
  | at Future._asyncComplete.<anonymous closure> | (future_impl.dart:552 )
  | at _rootRun | (zone.dart:1124 )
  | at _CustomZone.run | (zone.dart:1021 )
  | at _CustomZone.runGuarded | (zone.dart:923 )
  | at _CustomZone.bindCallbackGuarded.<anonymous closure> | (zone.dart:963 )
  | at _microtaskLoop | (schedule_microtask.dart:41 )
  | at _startMicrotaskLoop | (schedule_microtask.dart:50 )
  | at _runPendingImmediateCallback | (isolate_patch.dart:116 )
  | at _RawReceivePortImpl._handleMessage | (isolate_patch.dart:173 )
```

The existing code in the Flutter tool can be made to work with a fix in `readAsLines()` to make the `Future` it returns only when the asynchronous close completes. However, this code in the Flutter tool should be made more idiomatic by instead treating the named pipe as a `Stream`.
Repository: terminal
Issue: conpty uses default history buffer length
Labels: Product-Conhost,Product-Conpty,Issue-Bug,Area-Settings

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.

All good? Then proceed!
-->

# Description of the new feature/enhancement

<!-- 
A clear and concise description of what the problem is that the new feature would solve.
Describe why and how a user would use this new functionality (if applicable).
-->

Right now cmd.exe instances opened by Terminal do not seem to obey the command buffer size set on cmd.exe, nor does it offer a way to set this within Terminal. Currently cmd.exe instances opened within Terminal seems hard coded to the default of 50.
Repository: material-ui
Issue: [Lab] Improve accessibility of ToggleButton and ToggleButtonGroup
Labels: accessibility,component: toggle button

## Summary 💡

I'm opening this issue as a continuation of discussion that was initiated in #17187.

ToggleButton and ToggleButtonGroup elements should be marked with appropriate role and aria attributes depending on their usage.

Copying part of my comment from #17187, this is what I envision:

- **ToggleButtonGroup exclusive selection**:
  - ToggleButtonGroup has `role="group"` and `aria-label="......"` attributes
  - ToggleButtons have `role="menuitemradio"`, `aria-checked="true/false"`, and maybe aria-label attributes.
- **ToggleButtonGroup multiple selection**:
  - ToggleButtonGroup has `role="group"` and `aria-label="......"` attributes
  - ToggleButtons have `role="menuitemcheckbox"`, `aria-checked="true/false"`, and, if necessary, `aria-label="...."` attributes
- **Standalone ToggleButton**:
  - ToggleButton has `role="button"`, `aria-pressed="true/false"`, and maybe aria-label.

It would be great if somebody with more experience in accessibility could chime in.

## Examples 🌈

A reference example: http://jongund.github.io/oaa-examples/examples/menubar/menubar-2/menubar-2.html (Jon Gunderson does a lot of work on W3C Aria Practices. I'd consider him a reliable source.)

FWIW, Angular Material's example uses `role="group"` on their ToggleButtonGroup and `role="button"` on their ToggleButtons. Their docs only have an example of exclusive selection though. I haven't bothered seeing what they do in a multiple selection scenario, though they describe it: https://material.angular.io/components/button-toggle/overview#accessibility

https://www.w3.org/WAI/PF/aria/roles

## Motivation 🔦

Improve accessibility.
Repository: pytorch
Issue: JIT leaks memory when I change the max sequence length
Labels: oncall: jit,triaged,has workaround

## 🐛 Bug

When I send a series of inputs of a different max_length to jit, it allocates ~200 megabytes and never frees it.
Valgrind does not catch the leak, but it's there.
[standalone_jit_memory_leak.zip](https://github.com/pytorch/pytorch/files/3547845/standalone_jit_memory_leak.zip)
This is CPU forward pass only. No training. No GPU.

## To Reproduce

Steps to reproduce the behavior:
The attached project feeds randomly generated data into the JIT.
The sequence length is different each time.

1. Use a linux machine or edit the memory_use code to work with your OS
1. unzip the package (torch v1.2.0 must be accessible to CMake)
1. compile and run main.cpp through cmake
1. observe how memory usage increases rapidly with each iteration

0: 0.75GB
1: 1GB
2: 1.2GB
3: 1.6GB

## Expected behavior
Memory use should remain relatively constant
0: 0.75GB
1: 0.75GB
2: 0,75GB
3: 0,75GB

## Environment

PyTorch version: 1.2.0a0+8554416
Is debug build: No
CUDA used to build PyTorch: None

OS: CentOS Linux 7 (Core)
GCC version: (GCC) 7.4.0
CMake version: version 3.14.0

Python version: 3.7
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip] numpy==1.16.2
[pip] numpydoc==0.8.0
[pip] torch==1.2.0a0+8554416
[conda] blas                      1.0                         mkl  
[conda] mkl                       2019.3                      199  
[conda] mkl-include               2019.4                      243  
[conda] mkl-service               1.1.2            py37he904b0f_5  
[conda] mkl_fft                   1.0.10           py37ha843d7b_0  
[conda] mkl_random                1.0.2            py37hd81dba3_0  
[conda] torch                     1.2.0a0+8554416          pypi_0    pypi

## Additional context


cc @ezyang @gchanan @zou3519 @suo
Repository: react
Issue: Confusing error when passing non-function to useMemo
Labels: Component: Hooks,Partner



[Example](https://codesandbox.io/s/boring-albattani-grhhp).

When passing something like an object to `useMemo` the error isn't very helpful.

```
TypeError: nextCreate is not a function
    at mountMemo (https://grhhp.csb.app/node_modules/react-dom/cjs/react-dom.development.js:13459:19)
    ...
```

Most developers wont know what `nextCreate` is, and passing an object to `useMemo` doesn't seem _obviously_ wrong at first. We could add a `typeof` check that throws a better error, but maybe that's too much overhead? At the very least we could add a DEV warning with more helpful guidance.
Repository: go
Issue: os: SMB not respecting calls to os.Chtimes (from windows)
Labels: OS-Windows,NeedsInvestigation

Mentioned in #31880 
<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version go1.12.7 windows/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env

amd64 
windows
</pre></details>

### What did you do?

I wrote a program that copies media files from one location to another and sets the ctime and mtime to the original file timestamp. The program copies a file and changes the date using `io.Copy(destFile, srcFile)` then calls `os.Chtimes(dest, t.AccessTime(), t.ModTime())` to set the dates. 

### What did you expect to see?
The dates to change to the dates provided... or an error at least. This silently fails. 

### What did you see instead?
It works appropriately in most cases, but when copying from a windows machine to a Linux SMB server the destination date is always set to `now` instead of changing to the src date. 

It works from Windows to Windows and from Mac to Mac. I haven't tried other combinations yet.
Repository: neovim
Issue: paste: handle "dangling paste" (missing stop-paste code)
Labels: enhancement,clipboard,tui,input,has:plan

Since https://github.com/neovim/neovim/pull/4448 , paste is handled now by the `vim.paste()` handler (which is invoked by the UI via `nvim_paste()`).

There is a potential issue where the TUI could get stuck in paste-mode if the host terminal fails to send a stop-paste sequence (`<Esc>[201~`). In this state, the user could recover by RPC:

    nvim_paste([''], 3)

Nvim GUIs using `nvim_paste` do _not_ need such workarounds because they use an out-of-band channel (as opposed to the TUI where user input + paste are in-band).

Vim [fixed a similar issue](https://github.com/vim/vim/commit/fdd7155fab3447b38280035c66178330f8f041e7) with its bracketed-paste implementation, but:

- the "infinite loop" problem does not apply because Nvim doesn't actively loop
- CTRL-C would not interrupt the paste in Nvim, so a "dangling paste" is less likely. (Could be caused by network failure instead.)
    - But CTRL-C would be useful for _recovering from_ this "stuck in paste" state.
    - Related: https://github.com/neovim/neovim/issues/13031#issuecomment-1138454495

# Plan

1. TUI needs to check `nvim_paste()` result (e.g. revert https://github.com/neovim/neovim/pull/10878/commits/2c605d1f22a243bc34b680f69c7c8cfe01b80887 )
2. `vim.paste()` Lua handler could track some state to decide if a paste is "stuck". E.g. if the paste stream is very "slow", and CTRL-C is seen ~twice in a row, we can guess that (1) the paste was exhausted and (2) the user is trying to cancel the operation, thus `false` should be returned.
Repository: go
Issue: net/http: setting IdleConnTimeout to a low value on http.Transport is causing non-deterministic tls handshake failures
Labels: NeedsInvestigation

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.12.9 darwin/amd64
</pre>

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/ahmetb/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/ahmetb/go"
GOPROXY=""
GORACE=""
GOROOT="/Users/ahmetb/.homebrew/Cellar/go/1.12.9/libexec"
GOTMPDIR=""
GOTOOLDIR="/Users/ahmetb/.homebrew/Cellar/go/1.12.9/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/h7/n46zg3md4l57vzsgxcs355hw00dl55/T/go-build140871803=/tmp/go-build -gno-record-gcc-switches -fno-common"

</pre></details>

### What did you do?

Consider the following program that sets

- `IdleConnTimeout: 1 * time.Nanosecond`
- `MaxIdleConns: 1`

and makes GET https://example.com calls:

```go
package main

import (
	"net/http"
	"time"
	"log"
	"net"
)

func main() {
	c := &http.Client{
		Transport: &http.Transport{
			IdleConnTimeout:       1 * time.Nanosecond,
			MaxIdleConns: 1,
			DialContext: (&net.Dialer{
				KeepAlive: -1,
			}).DialContext,
		},
	}

	for {
		req, _ := http.NewRequest(http.MethodGet, "https://www.example.com", nil)
		resp, err := c.Do(req)
		if err != nil {
			log.Fatal(err)
		}
		resp.Body.Close()
		log.Printf("request complete")
		time.Sleep(100*time.Millisecond)
	}
}
```


### What did you expect to see?

Client uses tls connection fully. Puts it back, then the timeout starts counting. 

### What did you see instead?

It seems like there’s a race between this deadline and how the connection is used. After 1 nanosecond the connection expires and goes away from the pool, so I get non-deterministic tls handshake failures

Sometimes 1 or 2 requests work before tls handshake error hits. Sometimes it directly fails on the first request:

```
go run main.go
2019/08/27 16:48:17 request complete
2019/08/27 16:48:17 Get https://www.example.com: tls: use of closed connection
exit status 1
```
```
go run main.go
2019/08/27 16:48:21 Get https://www.example.com: tls: use of closed connection
exit status 1
```

Apparently the conn is actually being used for tls handshake, possibly because 1 nanosecond is too low so that when the connection is established, it goes away just before TLS handshake starts.

Not sure if this is expected.