Skip to content

Commit 9f7994a

Browse files
author
Hubert Plociniczak
committed
Removed processShutdownSignal/2 in ChannelN
to avoid unnecessary confusion.
1 parent 823ce39 commit 9f7994a

File tree

3 files changed

+11
-16
lines changed

3 files changed

+11
-16
lines changed

src/com/rabbitmq/client/impl/AMQChannel.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ public synchronized void quiescingRpc(Method m, RpcContinuation k)
224224
* @param notifyRpc the flag indicating whether any remaining rpc continuation should be
225225
* notified with the given signal
226226
*/
227-
public void processShutdownSignal(ShutdownSignalException signal, boolean ignoreClosed, boolean notifyRpc) {
227+
public void processShutdownSignal(ShutdownSignalException signal,
228+
boolean ignoreClosed,
229+
boolean notifyRpc) {
228230
try {
229231
synchronized (this) {
230232
if (!ignoreClosed)
@@ -238,16 +240,6 @@ public void processShutdownSignal(ShutdownSignalException signal, boolean ignore
238240
}
239241
}
240242

241-
/**
242-
* Protected API - respond, in the driver thread, to a {@link ShutdownSignalException}.
243-
* The method behaves in the same way as processShutdownSignal(ShutdownSignalException, boolean, boolean)
244-
* with the only difference that any continuing rpc is always notified of the shutdown signal.
245-
* @param signal the signal to handle
246-
*/
247-
public void processShutdownSignal(ShutdownSignalException signal, boolean ignoreClosed) {
248-
processShutdownSignal(signal, ignoreClosed, true);
249-
}
250-
251243
public void notifyOutstandingRpc(ShutdownSignalException signal) {
252244
RpcContinuation k = nextOutstandingRpc();
253245
if (k != null) {

src/com/rabbitmq/client/impl/ChannelManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void handleSignal(ShutdownSignalException signal) {
6868
}
6969
for (AMQChannel channel : channels) {
7070
disconnectChannel(channel.getChannelNumber());
71-
channel.processShutdownSignal(signal, true);
71+
channel.processShutdownSignal(signal, true, true);
7272
}
7373
}
7474

src/com/rabbitmq/client/impl/ChannelN.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,11 @@ public void broadcastShutdownSignal(ShutdownSignalException signal) {
145145
* Protected API - overridden to broadcast the signal to all
146146
* consumers before calling the superclass's method.
147147
*/
148-
@Override public void processShutdownSignal(ShutdownSignalException signal, boolean ignoreClosed) {
149-
super.processShutdownSignal(signal, ignoreClosed);
148+
@Override public void processShutdownSignal(ShutdownSignalException signal,
149+
boolean ignoreClosed,
150+
boolean notifyRpc)
151+
{
152+
super.processShutdownSignal(signal, ignoreClosed, notifyRpc);
150153
broadcastShutdownSignal(signal);
151154
}
152155

@@ -222,7 +225,7 @@ public void releaseChannelNumber() {
222225
command,
223226
this);
224227
synchronized(this) {
225-
processShutdownSignal(signal, true);
228+
processShutdownSignal(signal, true, true);
226229
quiescingTransmit(new Channel.CloseOk());
227230
}
228231
notifyListeners();
@@ -285,7 +288,7 @@ public void close(int closeCode,
285288
// Synchronize the block below to avoid race conditions in case
286289
// connnection wants to send Connection-CloseOK
287290
synchronized(this) {
288-
processShutdownSignal(signal, !initiatedByApplication);
291+
processShutdownSignal(signal, !initiatedByApplication, true);
289292
quiescingRpc(reason, k);
290293
}
291294

0 commit comments

Comments
 (0)