()
| 42 | } |
| 43 | |
| 44 | func (counter *counter) done() int { |
| 45 | counter.mutex.Lock() |
| 46 | defer counter.mutex.Unlock() |
| 47 | |
| 48 | counter.connections-- |
| 49 | counter.wg.Done() |
| 50 | if counter.connections == 0 && counter.duration > 0 { |
| 51 | counter.zeroTimer.Reset(counter.duration) |
| 52 | } |
| 53 | |
| 54 | return counter.connections |
| 55 | } |
| 56 | |
| 57 | func (counter *counter) count() int { |
| 58 | counter.mutex.Lock() |
no outgoing calls
no test coverage detected