diff options
| author | Gordon Sim <gsim@apache.org> | 2008-04-14 19:19:27 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-04-14 19:19:27 +0000 |
| commit | be454984582db8163c7d88e20b07995f2ccdced8 (patch) | |
| tree | c7195d183779749ffa1481d4a722d3d79a34a8c2 /cpp/src/qpid/sys | |
| parent | 0e4526fa8f381e2275d05be03de81802bc0dcabc (diff) | |
| download | qpid-python-be454984582db8163c7d88e20b07995f2ccdced8.tar.gz | |
QPID-648: more flexible sasl implementation (patch provided by mfarrellee@redhat.com)
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@647940 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys')
| -rw-r--r-- | cpp/src/qpid/sys/AsynchIOAcceptor.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/cpp/src/qpid/sys/AsynchIOAcceptor.cpp b/cpp/src/qpid/sys/AsynchIOAcceptor.cpp index 153557c5e5..5c784912b3 100644 --- a/cpp/src/qpid/sys/AsynchIOAcceptor.cpp +++ b/cpp/src/qpid/sys/AsynchIOAcceptor.cpp @@ -246,13 +246,19 @@ void AsynchIOHandler::readbuff(AsynchIO& , AsynchIO::BufferBase* buff) { if (protocolInit.decode(in)) { decoded = in.getPosition(); QPID_LOG(debug, "RECV [" << identifier << "] INIT(" << protocolInit << ")"); - codec = factory->create(protocolInit.getVersion(), *this, identifier); - if (!codec) { - //TODO: may still want to revise this... - //send valid version header & close connection. - write(framing::ProtocolInitiation(framing::highestProtocolVersion)); + try { + codec = factory->create(protocolInit.getVersion(), *this, identifier); + if (!codec) { + //TODO: may still want to revise this... + //send valid version header & close connection. + write(framing::ProtocolInitiation(framing::highestProtocolVersion)); + readError = true; + aio->queueWriteClose(); + } + } catch (const std::exception& e) { + QPID_LOG(error, e.what()); readError = true; - aio->queueWriteClose(); + aio->queueWriteClose(); } } } |
