File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed
src/com/rabbitmq/client/impl Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,22 @@ public void releaseChannelNumber() {
172172 // incoming commands except for a close-ok.
173173
174174 Method method = command .getMethod ();
175+
176+ if (method instanceof Channel .Close ) {
177+ // Channel should always respond to Channel.Close
178+ // from the server
179+ releaseChannelNumber ();
180+ ShutdownSignalException signal = new ShutdownSignalException (false ,
181+ false ,
182+ command ,
183+ this );
184+ synchronized (this ) {
185+ processShutdownSignal (signal , true , true );
186+ quiescingTransmit (new Channel .CloseOk ());
187+ }
188+ notifyListeners ();
189+ return true ;
190+ }
175191 if (isOpen ()) {
176192 // We're in normal running mode.
177193
@@ -219,18 +235,6 @@ public void releaseChannelNumber() {
219235 }
220236 }
221237 return true ;
222- } else if (method instanceof Channel .Close ) {
223- releaseChannelNumber ();
224- ShutdownSignalException signal = new ShutdownSignalException (false ,
225- false ,
226- command ,
227- this );
228- synchronized (this ) {
229- processShutdownSignal (signal , true , true );
230- quiescingTransmit (new Channel .CloseOk ());
231- }
232- notifyListeners ();
233- return true ;
234238 } else {
235239 return false ;
236240 }
You can’t perform that action at this time.
0 commit comments