File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -313,17 +313,26 @@ public ProcessHelper(AbstractSessionImpl session)
313
313
{
314
314
_session = session ;
315
315
_context = new SessionIdLoggingContext ( session . SessionId ) ;
316
- session . CheckAndUpdateSessionStatus ( ) ;
317
- _session . _processing = true ;
316
+ try
317
+ {
318
+ _session . CheckAndUpdateSessionStatus ( ) ;
319
+ _session . _processing = true ;
320
+ }
321
+ catch
322
+ {
323
+ _context . Dispose ( ) ;
324
+ _context = null ;
325
+ throw ;
326
+ }
318
327
}
319
328
320
329
public void Dispose ( )
321
330
{
331
+ _context . Dispose ( ) ;
332
+ _context = null ;
322
333
if ( _session == null )
323
334
throw new ObjectDisposedException ( "The session process helper has been disposed already" ) ;
324
335
_session . _processing = false ;
325
- _context . Dispose ( ) ;
326
- _context = null ;
327
336
_session = null ;
328
337
}
329
338
}
You can’t perform that action at this time.
0 commit comments