Skip to content

Commit

Permalink
small changes to the data source loading
Browse files Browse the repository at this point in the history
  • Loading branch information
caffix committed May 9, 2023
1 parent 2c8fe69 commit 199e7c6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions systems/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import (
"sync"
"time"

"github.com/caffix/netmap"
"github.com/caffix/service"
"github.com/owasp-amass/amass/v3/config"
amassnet "github.com/owasp-amass/amass/v3/net"
"github.com/owasp-amass/amass/v3/requests"
"github.com/owasp-amass/amass/v3/resources"
"github.com/caffix/netmap"
"github.com/owasp-amass/resolve"
"github.com/caffix/service"
)

// LocalSystem implements a System to be executed within a single process.
Expand Down Expand Up @@ -141,15 +141,15 @@ func (l *LocalSystem) DataSources() []service.Service {

// SetDataSources assigns the data sources that will be used by the system.
func (l *LocalSystem) SetDataSources(sources []service.Service) error {
f := func(src service.Service, ch chan error) { ch <- l.AddAndStart(src) }

ch := make(chan error, len(sources))
// Add all the data sources that successfully start to the list
for _, src := range sources {
go f(src, ch)
go func(src service.Service, ch chan error) {
ch <- l.AddAndStart(src)
}(src, ch)
}

t := time.NewTimer(30 * time.Second)
t := time.NewTimer(time.Minute)
defer t.Stop()

var err error
Expand Down

0 comments on commit 199e7c6

Please sign in to comment.