@@ -790,8 +790,9 @@ public void NotifyReceivedCloseOk()
790
790
///<summary>
791
791
/// Sets the channel named in the SoftProtocolException into
792
792
/// "quiescing mode", where we issue a channel.close and
793
- /// ignore everything up to the channel.close-ok reply that
794
- /// should eventually arrive.
793
+ /// ignore everything except for subsequent channel.close
794
+ /// messages and the channel.close-ok reply that should
795
+ /// eventually arrive.
795
796
///</summary>
796
797
///<remarks>
797
798
///<para>
@@ -816,23 +817,12 @@ public void NotifyReceivedCloseOk()
816
817
///</para>
817
818
///</remarks>
818
819
public void QuiesceChannel ( SoftProtocolException pe ) {
819
- // First, construct the close request and QuiescingSession
820
- // that we'll use during the quiesce process.
821
-
822
- Command request ;
823
- int replyClassId ;
824
- int replyMethodId ;
825
- Protocol . CreateChannelClose ( pe . ReplyCode ,
826
- pe . Message ,
827
- out request ,
828
- out replyClassId ,
829
- out replyMethodId ) ;
820
+ // Construct the QuiescingSession that we'll use during
821
+ // the quiesce process.
830
822
831
823
ISession newSession = new QuiescingSession ( this ,
832
824
pe . Channel ,
833
- pe . ShutdownReason ,
834
- replyClassId ,
835
- replyMethodId ) ;
825
+ pe . ShutdownReason ) ;
836
826
837
827
// Here we detach the session from the connection. It's
838
828
// still alive: it just won't receive any further frames
@@ -851,7 +841,7 @@ public void QuiesceChannel(SoftProtocolException pe) {
851
841
// our peer. The peer will respond through the lower
852
842
// layers - specifically, through the QuiescingSession we
853
843
// installed above.
854
- newSession . Transmit ( request ) ;
844
+ newSession . Transmit ( ChannelCloseWrapper ( pe . ReplyCode , pe . Message ) ) ;
855
845
}
856
846
857
847
public void HandleMainLoopException ( ShutdownEventArgs reason ) {
@@ -959,7 +949,19 @@ public Command ConnectionCloseWrapper(ushort reasonCode, string reasonText)
959
949
out replyClassId ,
960
950
out replyMethodId ) ;
961
951
return request ;
962
- }
952
+ }
953
+
954
+ protected Command ChannelCloseWrapper ( ushort reasonCode , string reasonText )
955
+ {
956
+ Command request ;
957
+ int replyClassId , replyMethodId ;
958
+ Protocol . CreateChannelClose ( reasonCode ,
959
+ reasonText ,
960
+ out request ,
961
+ out replyClassId ,
962
+ out replyMethodId ) ;
963
+ return request ;
964
+ }
963
965
964
966
private static uint NegotiatedMaxValue ( uint clientValue , uint serverValue )
965
967
{
0 commit comments