mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-03 08:46:46 +00:00
adds missing writePending flag
This commit is contained in:
@@ -210,7 +210,7 @@ ConnectAttempt::setTimer()
|
||||
{
|
||||
try
|
||||
{
|
||||
timer_.expires_after(connectTimeout_);
|
||||
timer_.expires_after(connectTimeout);
|
||||
}
|
||||
catch (std::exception const& ex)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,8 @@ private:
|
||||
using stream_type = boost::beast::ssl_stream<middle_type>;
|
||||
using shared_context = std::shared_ptr<boost::asio::ssl::context>;
|
||||
|
||||
std::chrono::seconds const connectTimeout_{15};
|
||||
static constexpr std::chrono::seconds connectTimeout{15};
|
||||
|
||||
Application& app_;
|
||||
std::uint32_t const id_;
|
||||
beast::WrappedSink sink_;
|
||||
|
||||
@@ -289,6 +289,7 @@ PeerImp::send(std::shared_ptr<Message> const& m)
|
||||
if (sendq_size != 0)
|
||||
return;
|
||||
|
||||
writePending_ = true;
|
||||
boost::asio::async_write(
|
||||
stream_,
|
||||
boost::asio::buffer(
|
||||
@@ -648,7 +649,7 @@ PeerImp::shutdown()
|
||||
strand_.running_in_this_thread(),
|
||||
"ripple::PeerImp::shutdown: strand in this thread");
|
||||
|
||||
if (!socket_.is_open())
|
||||
if (!socket_.is_open() || shutdown_)
|
||||
return;
|
||||
|
||||
shutdown_ = true;
|
||||
@@ -656,7 +657,7 @@ PeerImp::shutdown()
|
||||
boost::beast::get_lowest_layer(stream_).cancel();
|
||||
|
||||
tryAsyncShutdown();
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
PeerImp::onShutdown(error_code ec)
|
||||
|
||||
Reference in New Issue
Block a user