File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
projects/client/RabbitMQ.Client/src/client/impl Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -135,10 +135,13 @@ public ISession Create(int channelNumber)
135
135
136
136
public ISession CreateInternal ( int channelNumber )
137
137
{
138
- ISession session = new Session ( m_connection , channelNumber ) ;
139
- session . SessionShutdown += new SessionShutdownEventHandler ( HandleSessionShutdown ) ;
140
- m_sessionMap [ channelNumber ] = session ;
141
- return session ;
138
+ lock ( m_sessionMap )
139
+ {
140
+ ISession session = new Session ( m_connection , channelNumber ) ;
141
+ session . SessionShutdown += new SessionShutdownEventHandler ( HandleSessionShutdown ) ;
142
+ m_sessionMap [ channelNumber ] = session ;
143
+ return session ;
144
+ }
142
145
}
143
146
144
147
///<summary>Replace an active session slot with a new ISession
You can’t perform that action at this time.
0 commit comments