mirror of https://github.com/apache/activemq.git
Avoid logging error messages when an AMQP client gracefully disconnects.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1437550 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3602973cae
commit
0dfa5f483c
|
@ -270,11 +270,13 @@ class AmqpProtocolConverter {
|
|||
|
||||
public void onAMQPException(IOException error) {
|
||||
closedSocket = true;
|
||||
if( !closing) {
|
||||
System.out.println("AMQP client disconnected");
|
||||
error.printStackTrace();
|
||||
if( !closing ) {
|
||||
amqpTransport.sendToActiveMQ(error);
|
||||
} else {
|
||||
doClose();
|
||||
try {
|
||||
amqpTransport.stop();
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ public interface AmqpTransport {
|
|||
|
||||
public void sendToActiveMQ(Command command);
|
||||
|
||||
public void sendToActiveMQ(IOException command);
|
||||
|
||||
public void sendToAmqp(Object command) throws IOException;
|
||||
|
||||
public X509Certificate[] getPeerCertificates();
|
||||
|
|
|
@ -72,18 +72,18 @@ public class AmqpTransportFilter extends TransportFilter implements AmqpTranspor
|
|||
|
||||
@Override
|
||||
public void onException(IOException error) {
|
||||
protocolConverter.lock.lock();
|
||||
try {
|
||||
protocolConverter.lock.lock();
|
||||
try {
|
||||
protocolConverter.onAMQPException(error);
|
||||
} finally {
|
||||
protocolConverter.lock.unlock();
|
||||
}
|
||||
protocolConverter.onAMQPException(error);
|
||||
} finally {
|
||||
super.onException(error);
|
||||
protocolConverter.lock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
public void sendToActiveMQ(IOException error) {
|
||||
super.onException(error);
|
||||
}
|
||||
|
||||
public void onCommand(Object command) {
|
||||
try {
|
||||
if (trace) {
|
||||
|
|
Loading…
Reference in New Issue