more explicit tests for counting the number of streams in StreamsMap

This commit is contained in:
Marten Seemann
2016-08-05 20:33:35 +07:00
parent bf04a430ba
commit 1f25ff5569
2 changed files with 19 additions and 6 deletions

View File

@@ -69,6 +69,7 @@ func (m *streamsMap) RemoveStream(id protocol.StreamID) error {
return nil
}
// NumberOfStreams gets the number of open streams
func (m *streamsMap) NumberOfStreams() int {
m.mutex.RLock()
defer m.mutex.RUnlock()