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)
647
647
finally
648
648
{
649
649
// 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
+ }
651
654
}
652
655
}
653
656
else
@@ -664,7 +667,10 @@ private void ReleaseSocket(PooledSocket socket)
664
667
{
665
668
// make sure to signal the Acquire so it can create a new conenction
666
669
// if the failure policy keeps the pool alive
667
- this . semaphore . Release ( ) ;
670
+ if ( this . semaphore != null )
671
+ {
672
+ this . semaphore . Release ( ) ;
673
+ }
668
674
}
669
675
}
670
676
}
@@ -678,7 +684,10 @@ private void ReleaseSocket(PooledSocket socket)
678
684
}
679
685
finally
680
686
{
681
- this . semaphore . Release ( ) ;
687
+ if ( this . semaphore != null )
688
+ {
689
+ this . semaphore . Release ( ) ;
690
+ }
682
691
}
683
692
}
684
693
}
You can’t perform that action at this time.
0 commit comments