try making sure the connection closes in the SAM availability checker too
This commit is contained in:
13
launch.go
13
launch.go
@ -300,5 +300,16 @@ func SAM() error {
|
||||
} else {
|
||||
tcp4.Write([]byte("sam.create\n"))
|
||||
}
|
||||
return nil
|
||||
for i := 1; i < 10; i++ {
|
||||
conn, err := net.Dial("tcp4", net.JoinHostPort(loopbackInterface(), "7656"))
|
||||
if err != nil {
|
||||
log.Println("Connecting error:", err)
|
||||
}
|
||||
if conn != nil {
|
||||
conn.Close()
|
||||
return nil
|
||||
}
|
||||
time.Sleep(time.Duration(i*10) * time.Second)
|
||||
}
|
||||
return fmt.Errorf("Error connecting to %s", "SAM port")
|
||||
}
|
||||
|
Reference in New Issue
Block a user