Skip to content

Commit

Permalink
Fix not printing results to stdout.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanr committed Aug 3, 2015
1 parent cd39075 commit 1cbaed8
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions ssllabs-scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,14 +563,14 @@ func NewAssessment(host string, eventChannel chan Event) {
}

type HostProvider struct {
hostnames []string
i int
hostnames []string
StartingLen int
}

func NewHostProvider(hs []string) *HostProvider {
hostnames := make([]string, len(hs))
copy(hostnames, hs)
hostProvider := HostProvider{hostnames, 0}
hostProvider := HostProvider{hostnames, len(hs)}
return &hostProvider
}

Expand All @@ -589,10 +589,6 @@ func (hp *HostProvider) retry(host string) {
hp.hostnames = append(hp.hostnames, host)
}

func (hp *HostProvider) len() int {
return len(hp.hostnames)
}

type Manager struct {
hostProvider *HostProvider
FrontendEventChannel chan Event
Expand Down Expand Up @@ -726,7 +722,7 @@ func (manager *Manager) run() {
// Once a second, start a new assessment, provided there are
// hostnames left and we're not over the concurrent assessment limit.
default:
if manager.hostProvider.len() > 0 {
if manager.hostProvider.StartingLen > 0 {
<-time.NewTimer(time.Duration(globalNewAssessmentCoolOff) * time.Millisecond).C
}

Expand Down Expand Up @@ -956,7 +952,7 @@ func main() {
var results []byte
var err error

if hp.len() == 0 {
if hp.StartingLen == 0 {
return
}

Expand Down

0 comments on commit 1cbaed8

Please sign in to comment.