Skip to content

Commit

Permalink
remove the 4 items enqueued hack
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt committed Mar 15, 2024
1 parent e33728d commit 08e52fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,6 @@ func (a *Agent) taskLoop() {
}

a.closeMulticastConn()
a.updateConnectionState(ConnectionStateClosed)

after()

close(a.chanState)
Expand Down Expand Up @@ -278,7 +276,7 @@ func NewAgent(config *AgentConfig) (*Agent, error) { //nolint:gocognit

a := &Agent{
chanTask: make(chan task),
chanState: make(chan ConnectionState, 4),
chanState: make(chan ConnectionState),
chanCandidate: make(chan Candidate),
chanCandidatePair: make(chan *CandidatePair),
tieBreaker: globalMathRandomGenerator.Uint64(),
Expand Down
1 change: 1 addition & 0 deletions agent_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func (a *Agent) connectionStateRoutine() {
for s := range a.chanState {
a.onConnectionStateChange(s)

Check warning on line 52 in agent_handlers.go

View check run for this annotation

Codecov / codecov/patch

agent_handlers.go#L52

Added line #L52 was not covered by tests
}
a.onConnectionStateChange(ConnectionStateClosed)

Check warning on line 54 in agent_handlers.go

View check run for this annotation

Codecov / codecov/patch

agent_handlers.go#L54

Added line #L54 was not covered by tests
}

func (a *Agent) candidateRoutine() {
Expand Down

0 comments on commit 08e52fb

Please sign in to comment.