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)
313313 {
314314 _session = session ;
315315 _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+ }
318327 }
319328
320329 public void Dispose ( )
321330 {
331+ _context . Dispose ( ) ;
332+ _context = null ;
322333 if ( _session == null )
323334 throw new ObjectDisposedException ( "The session process helper has been disposed already" ) ;
324335 _session . _processing = false ;
325- _context . Dispose ( ) ;
326- _context = null ;
327336 _session = null ;
328337 }
329338 }
You can’t perform that action at this time.
0 commit comments