@@ -73,38 +73,30 @@ namespace RabbitMQ.Client.Impl
73
73
public class QuiescingSession : SessionBase
74
74
{
75
75
public ShutdownEventArgs m_reason ;
76
- protected int m_closeClassId ;
77
- protected int m_closeMethodId ;
78
- protected int m_closeOkClassId ;
79
- protected int m_closeOkMethodId ;
80
76
81
77
public QuiescingSession ( ConnectionBase connection ,
82
78
int channelNumber ,
83
79
ShutdownEventArgs reason )
84
80
: base ( connection , channelNumber )
85
81
{
86
82
m_reason = reason ;
87
- m_closeClassId = CommonFramingSpecs . ChannelClose . ClassId ;
88
- m_closeMethodId = CommonFramingSpecs . ChannelClose . MethodId ;
89
- m_closeOkClassId = CommonFramingSpecs . ChannelCloseOk . ClassId ;
90
- m_closeOkMethodId = CommonFramingSpecs . ChannelCloseOk . MethodId ;
91
83
}
92
84
93
85
public override void HandleFrame ( Frame frame )
94
86
{
95
87
if ( frame . Type == CommonFraming . Constants . FrameMethod ) {
96
88
MethodBase method = Connection . Protocol . DecodeMethodFrom ( frame . GetReader ( ) ) ;
97
- if ( ( method . ProtocolClassId == m_closeOkClassId )
98
- && ( method . ProtocolMethodId == m_closeOkMethodId ) )
89
+ if ( ( method . ProtocolClassId == CommonFramingSpecs . ChannelCloseOk . ClassId )
90
+ && ( method . ProtocolMethodId == CommonFramingSpecs . ChannelCloseOk . MethodId ) )
99
91
{
100
92
// This is the reply we were looking for. Release
101
93
// the channel with the reason we were passed in
102
94
// our constructor.
103
95
Close ( m_reason ) ;
104
96
return ;
105
97
}
106
- else if ( ( method . ProtocolClassId == m_closeClassId )
107
- && ( method . ProtocolMethodId == m_closeMethodId ) )
98
+ else if ( ( method . ProtocolClassId == CommonFramingSpecs . ChannelClose . ClassId )
99
+ && ( method . ProtocolMethodId == CommonFramingSpecs . ChannelClose . MethodId ) )
108
100
{
109
101
// We're already shutting down the channel, so
110
102
// just send back an ok.
0 commit comments