summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/sys/AsynchIOAcceptor.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/cpp/src/qpid/sys/AsynchIOAcceptor.cpp b/cpp/src/qpid/sys/AsynchIOAcceptor.cpp
index f74541d29a..6502885ed0 100644
--- a/cpp/src/qpid/sys/AsynchIOAcceptor.cpp
+++ b/cpp/src/qpid/sys/AsynchIOAcceptor.cpp
@@ -27,6 +27,7 @@
#include "Thread.h"
#include "qpid/sys/ConnectionOutputHandler.h"
+#include "qpid/framing/AMQP_HighestVersion.h"
#include "qpid/framing/reply_exceptions.h"
#include "qpid/framing/ProtocolInitiation.h"
#include "qpid/log/Statement.h"
@@ -247,10 +248,11 @@ void AsynchIOHandler::readbuff(AsynchIO& , AsynchIO::BufferBase* buff) {
QPID_LOG(debug, "RECV [" << identifier << "] INIT(" << protocolInit << ")");
codec = factory->create(protocolInit.getVersion(), *this, identifier);
if (!codec) {
- // FIXME aconway 2008-03-18: send valid version header & close connection.
- // FIXME aconway 2008-03-18: exception type
- throw Exception(
- QPID_MSG("Protocol version not supported: " << protocolInit));
+ //TODO: may still want to revise this...
+ //send valid version header & close connection.
+ write(framing::ProtocolInitiation(framing::highestProtocolVersion));
+ readError = true;
+ aio->queueWriteClose();
}
}
}