Skip to content

Commit b816809

Browse files
author
Emile Joubert
committed
Merged bug22930 into amqp_0_9_1
2 parents 8f0f79a + 1244829 commit b816809

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,13 @@ public static void protocolVersionMismatch(DataInputStream is) throws IOExceptio
177177
int transportLow = is.readUnsignedByte();
178178
int serverMajor = is.readUnsignedByte();
179179
int serverMinor = is.readUnsignedByte();
180+
181+
// 0-8 gets these the wrong way round
182+
if (serverMajor == 8 && serverMinor == 0) {
183+
serverMajor = 0;
184+
serverMinor = 8;
185+
}
186+
180187
x = new MalformedFrameException("AMQP protocol version mismatch; we are version " + AMQP.PROTOCOL.MAJOR + "-" + AMQP.PROTOCOL.MINOR
181188
+ ", server is " + serverMajor + "-" + serverMinor + " with transport " + transportHigh + "." + transportLow);
182189
} catch (IOException ex) {

0 commit comments

Comments
 (0)