@@ -899,8 +899,13 @@ public void PrettyPrintShutdownReport()
899
899
900
900
public void HandleConnectionBlocked ( string reason )
901
901
{
902
- ConnectionBlockedEventHandler handler ;
903
902
ConnectionBlockedEventArgs args = new ConnectionBlockedEventArgs ( reason ) ;
903
+ OnConnectionBlocked ( args ) ;
904
+ }
905
+
906
+ public void OnConnectionBlocked ( ConnectionBlockedEventArgs args )
907
+ {
908
+ ConnectionBlockedEventHandler handler ;
904
909
lock ( m_eventLock )
905
910
{
906
911
handler = m_connectionBlocked ;
@@ -919,27 +924,33 @@ public void HandleConnectionBlocked(string reason)
919
924
}
920
925
}
921
926
927
+
922
928
public void HandleConnectionUnblocked ( )
923
929
{
924
- ConnectionUnblockedEventHandler handler ;
925
- lock ( m_eventLock )
926
- {
927
- handler = m_connectionUnblocked ;
928
- }
929
- if ( handler != null )
930
- {
931
- foreach ( ConnectionUnblockedEventHandler h in handler . GetInvocationList ( ) ) {
932
- try {
933
- h ( this ) ;
934
- } catch ( Exception e ) {
935
- CallbackExceptionEventArgs args = new CallbackExceptionEventArgs ( e ) ;
936
- args . Detail [ "context" ] = "OnConnectionUnblocked" ;
937
- OnCallbackException ( args ) ;
938
- }
939
- }
940
- }
930
+ OnConnectionUnblocked ( ) ;
941
931
}
942
932
933
+ public void OnConnectionUnblocked ( )
934
+ {
935
+ ConnectionUnblockedEventHandler handler ;
936
+ lock ( m_eventLock )
937
+ {
938
+ handler = m_connectionUnblocked ;
939
+ }
940
+ if ( handler != null )
941
+ {
942
+ foreach ( ConnectionUnblockedEventHandler h in handler . GetInvocationList ( ) ) {
943
+ try {
944
+ h ( this ) ;
945
+ } catch ( Exception e ) {
946
+ CallbackExceptionEventArgs args = new CallbackExceptionEventArgs ( e ) ;
947
+ args . Detail [ "context" ] = "OnConnectionUnblocked" ;
948
+ OnCallbackException ( args ) ;
949
+ }
950
+ }
951
+ }
952
+ }
953
+
943
954
///<summary>Broadcasts notification of the final shutdown of the connection.</summary>
944
955
public void OnShutdown ( )
945
956
{
0 commit comments