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
x/crypto/ssh: *Client Dial() example does not call Close() #41906
Labels
Milestone
Comments
Change https://golang.org/cl/261417 mentions this issue: |
c-expert-zigbee
pushed a commit
to c-expert-zigbee/crypto_go
that referenced
this issue
Mar 28, 2022
Fixes golang/go#41906 Change-Id: I2eee82160a4450f531f11d5ba7bd6ed19c019992 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/261417 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Kevin Burke <kev@inburke.com> Trust: Roland Shoemaker <roland@golang.org>
c-expert-zigbee
added a commit
to c-expert-zigbee/crypto_go
that referenced
this issue
Mar 28, 2022
Fixes golang/go#41906 Change-Id: I2eee82160a4450f531f11d5ba7bd6ed19c019992 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/261417 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Kevin Burke <kev@inburke.com> Trust: Roland Shoemaker <roland@golang.org>
c-expert-zigbee
added a commit
to c-expert-zigbee/crypto_go
that referenced
this issue
Mar 29, 2022
Fixes golang/go#41906 Change-Id: I2eee82160a4450f531f11d5ba7bd6ed19c019992 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/261417 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Kevin Burke <kev@inburke.com> Trust: Roland Shoemaker <roland@golang.org>
c-expert-zigbee
added a commit
to c-expert-zigbee/crypto_go
that referenced
this issue
Mar 29, 2022
Fixes golang/go#41906 Change-Id: I2eee82160a4450f531f11d5ba7bd6ed19c019992 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/261417 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Kevin Burke <kev@inburke.com> Trust: Roland Shoemaker <roland@golang.org>
LewiGoddard
pushed a commit
to LewiGoddard/crypto
that referenced
this issue
Feb 16, 2023
Fixes golang/go#41906 Change-Id: I2eee82160a4450f531f11d5ba7bd6ed19c019992 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/261417 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Kevin Burke <kev@inburke.com> Trust: Roland Shoemaker <roland@golang.org>
BiiChris
pushed a commit
to BiiChris/crypto
that referenced
this issue
Sep 15, 2023
Fixes golang/go#41906 Change-Id: I2eee82160a4450f531f11d5ba7bd6ed19c019992 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/261417 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Kevin Burke <kev@inburke.com> Trust: Roland Shoemaker <roland@golang.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The example for ssh.Dial in the x/crypto/ssh package opens a
*Client
. It then opens a*Session
, which gets closed, but does not indicate that the*Client
should be closed.I didn't realize that the Client needed to be closed, and as a result, had a huge number of open SSH sessions on a server.
Related to this, the doc summary for the *Client only shows methods directly on the Client, not inherited methods -
Close()
is an inherited method. Scanning the doc header, I did not realize this.There are a few stackoverflow questions that indicate similar confusion
https://stackoverflow.com/a/42590388/329700
https://stackoverflow.com/a/62308528/329700
The text was updated successfully, but these errors were encountered: