Author: tabish
Date: Tue Nov 4 12:08:30 2008
New Revision: 711372
URL: http://svn.apache.org/viewvc?rev=711372&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQCPP-200
Move deletion of buffer to the destructor, not the close method.
Modified:
activemq/activemq-cpp/trunk/src/main/decaf/io/BufferedInputStream.h
Modified: activemq/activemq-cpp/trunk/src/main/decaf/io/BufferedInputStream.h
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/io/BufferedInputStream.h?rev=711372&r1=711371&r2=711372&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/io/BufferedInputStream.h
(original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/io/BufferedInputStream.h Tue Nov
4 12:08:30 2008
@@ -94,7 +94,7 @@
* input stream.
*/
virtual std::size_t available() const throw ( IOException ) {
- if( buffer == NULL ) {
+ if( buffer == NULL || this->isClosed() ) {
throw IOException(
__FILE__, __LINE__,
"BufferedInputStream::available - Buffer was closed");