Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Increment 'active' counter in swarm dial worker loop #291

Closed
schomatis opened this issue Nov 5, 2021 · 6 comments · Fixed by #305
Closed

Increment 'active' counter in swarm dial worker loop #291

schomatis opened this issue Nov 5, 2021 · 6 comments · Fixed by #305

Comments

@schomatis
Copy link

Not sure where it should be incremented but likely around this case:

case <-triggerDial:
for _, addr := range nextDial {
// spawn the dial
ad := pending[addr]
err := s.dialNextAddr(ad.ctx, p, addr, resch)
if err != nil {
dispatchError(ad, err)
}
}
nextDial = nil
triggerDial = nil
case res := <-resch:
active--

cc @vyzo

@vyzo
Copy link
Contributor

vyzo commented Nov 6, 2021

is there a reason for that? are we missing something? in short, what's the bug?

@schomatis
Copy link
Author

I don't have much insight into the code but I think the active variable is a counter that tracks processing dials. When we finish with a dial (we get a response from the dial function) we decrement it, but I didn't see any place where the variable was actually incremented.

@marten-seemann
Copy link
Contributor

@schomatis @vyzo is there anything we need to do here?

@vyzo
Copy link
Contributor

vyzo commented Dec 21, 2021 via email

@vyzo
Copy link
Contributor

vyzo commented Dec 21, 2021 via email

@vyzo
Copy link
Contributor

vyzo commented Dec 21, 2021

See #305 -- I was pretty sure this code was there originally!

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 a pull request may close this issue.

3 participants