File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -647,7 +647,10 @@ private void ReleaseSocket(PooledSocket socket)
647647 finally
648648 {
649649 // signal the event so if someone is waiting for it can reuse this item
650- this . semaphore . Release ( ) ;
650+ if ( this . semaphore != null )
651+ {
652+ this . semaphore . Release ( ) ;
653+ }
651654 }
652655 }
653656 else
@@ -664,7 +667,10 @@ private void ReleaseSocket(PooledSocket socket)
664667 {
665668 // make sure to signal the Acquire so it can create a new conenction
666669 // if the failure policy keeps the pool alive
667- this . semaphore . Release ( ) ;
670+ if ( this . semaphore != null )
671+ {
672+ this . semaphore . Release ( ) ;
673+ }
668674 }
669675 }
670676 }
@@ -678,7 +684,10 @@ private void ReleaseSocket(PooledSocket socket)
678684 }
679685 finally
680686 {
681- this . semaphore . Release ( ) ;
687+ if ( this . semaphore != null )
688+ {
689+ this . semaphore . Release ( ) ;
690+ }
682691 }
683692 }
684693 }
You can’t perform that action at this time.
0 commit comments