mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-11 14:45:52 +00:00
Fix PrefilledReadStream::close to use lowest_layer
This commit is contained in:
@@ -108,12 +108,19 @@ public:
|
|||||||
|
|
||||||
void close()
|
void close()
|
||||||
{
|
{
|
||||||
m_next_layer.close();
|
error_code ec;
|
||||||
|
if (close(ec))
|
||||||
|
throw_error (ec, __FILE__, __LINE__);
|
||||||
|
return ec;
|
||||||
}
|
}
|
||||||
|
|
||||||
error_code close(error_code& ec)
|
error_code close (error_code& ec)
|
||||||
{
|
{
|
||||||
return m_next_layer.close(ec);
|
// VFALCO NOTE This is questionable. We can't
|
||||||
|
// call m_next_layer.close() because Stream might not
|
||||||
|
// support that function. For example, ssl::stream has no close()
|
||||||
|
//
|
||||||
|
return lowest_layer ().close(ec);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename MutableBufferSequence>
|
template <typename MutableBufferSequence>
|
||||||
|
|||||||
Reference in New Issue
Block a user