fix coverage (#1741)

* fix coverage

* fix data races
This commit is contained in:
Caleb Doxsey 2021-01-06 08:30:38 -07:00 committed by GitHub
parent 6ea8d34b8f
commit 4f0ce4bc82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 21 deletions

View file

@ -196,8 +196,9 @@ func (tun *Tunnel) run(ctx context.Context, local io.ReadWriter, rawJWT string,
_, err := io.Copy(remote, local)
errc <- err
}()
remoteReader := deBuffer(br, remote)
go func() {
_, err := io.Copy(local, deBuffer(br, remote))
_, err := io.Copy(local, remoteReader)
errc <- err
}()