Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Unify some things around SSH handling #607

Merged
merged 2 commits into from
Jun 2, 2020

Conversation

luxas
Copy link
Contributor

@luxas luxas commented Jun 2, 2020

@luxas luxas requested a review from stealthybox as a code owner June 2, 2020 13:27
@@ -74,12 +76,16 @@ func dialSuccess(vm *ignite.VM, seconds int) error {
for i := 0; i < seconds*perSecond; i++ {
conn, dialErr := net.DialTimeout("tcp", addr, delay)
if conn != nil {
defer conn.Close()
conn.Close()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From group review:
This fixes a bug where the connections would stay open as this loop continued.
The defers stack at the end of the function which is not within the loop.

Copy link
Contributor

@darkowlzz darkowlzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thanks.

@darkowlzz darkowlzz merged commit 3436728 into weaveworks:master Jun 2, 2020
@luxas luxas added this to the v0.7.0 milestone Jun 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants