Skip to content

Commit d868699

Browse files
author
Matthias Radestock
committed
merge bug18624 into default
2 parents d156e51 + a9ccd86 commit d868699

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,7 @@ public synchronized void rpc(Method m, RpcContinuation k)
208208
* Not for regular use. Doesn't do the ensureIsOpen() check.
209209
*/
210210
public AMQCommand quiescingRpc(Method m,
211-
int timeoutMillisec,
212-
final AMQCommand timeoutReply)
211+
int timeoutMillisec)
213212
throws IOException, ShutdownSignalException, TimeoutException
214213
{
215214
SimpleBlockingRpcContinuation k = new SimpleBlockingRpcContinuation();

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,6 @@ public void close(int closeCode,
661661
throws IOException
662662
{
663663
close(closeCode, closeMessage, initiatedByApplication, cause, 0, false);
664-
665664
}
666665

667666
/**
@@ -679,11 +678,10 @@ public void close(int closeCode,
679678
AMQImpl.Connection.Close reason =
680679
new AMQImpl.Connection.Close(closeCode, closeMessage, 0, 0);
681680
shutdown(reason, initiatedByApplication, cause);
682-
_channel0.quiescingRpc(reason,
683-
timeout,
684-
new AMQCommand(new AMQImpl.Connection.CloseOk()));
685-
} catch (TimeoutException ise) {
686-
// FIXME: notify about timeout exception ?
681+
_channel0.quiescingRpc(reason, timeout);
682+
} catch (TimeoutException tte) {
683+
if (!abort)
684+
throw new ShutdownSignalException(true, true, tte, this);
687685
} catch (ShutdownSignalException sse) {
688686
if (!abort)
689687
throw sse;

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@
6565
public class ChannelN extends AMQChannel implements com.rabbitmq.client.Channel {
6666
private static final String UNSPECIFIED_OUT_OF_BAND = "";
6767

68-
public static final int CLOSING_TIMEOUT = 10000; // timeout in milliseconds
69-
7068
/**
7169
* Map from consumer tag to {@link Consumer} instance.
7270
*
@@ -288,11 +286,9 @@ public void close(int closeCode,
288286
// quiescingRpc instead. We ignore the result. (It's always
289287
// close-ok.)
290288
try {
291-
quiescingRpc(reason,
292-
CLOSING_TIMEOUT,
293-
new AMQCommand(new Channel.CloseOk()));
289+
quiescingRpc(reason, -1);
294290
} catch (TimeoutException ise) {
295-
// FIXME: propagate it to the user
291+
// Will never happen since we wait infinitely
296292
} catch (ShutdownSignalException sse) {
297293
// Ignore.
298294
}

0 commit comments

Comments
 (0)