mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-03 08:46:46 +00:00
adds a check whether the socket is open before sending a message
This commit is contained in:
@@ -240,9 +240,13 @@ PeerImp::send(std::shared_ptr<Message> const& m)
|
||||
{
|
||||
if (!strand_.running_in_this_thread())
|
||||
return post(strand_, std::bind(&PeerImp::send, shared_from_this(), m));
|
||||
|
||||
if (gracefulClose_)
|
||||
return;
|
||||
|
||||
if (!socket_.is_open())
|
||||
return;
|
||||
|
||||
auto validator = m->getValidatorKey();
|
||||
if (validator && !squelch_.expireSquelch(*validator))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user