From a919eead0be84e21ed4ff6ed051095b3ce7fbeeb Mon Sep 17 00:00:00 2001 From: Lucas Clemente Date: Thu, 13 Oct 2016 09:13:06 +0100 Subject: [PATCH] move streams map mutex to top of struct --- streams_map.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/streams_map.go b/streams_map.go index aebe7c85..8b41b861 100644 --- a/streams_map.go +++ b/streams_map.go @@ -11,13 +11,14 @@ import ( ) type streamsMap struct { + mutex sync.RWMutex + streams map[protocol.StreamID]*stream openStreams []protocol.StreamID highestStreamOpenedByClient protocol.StreamID streamsOpenedAfterLastGarbageCollect int - mutex sync.RWMutex newStream newStreamLambda maxNumStreams int