mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-05 04:15:51 +00:00
@@ -47,7 +47,7 @@ ProposedTransactionFeed::sub(SubscriberSharedPtr const& subscriber)
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (added) {
|
if (added) {
|
||||||
LOG(logger_.debug()) << subscriber->tag() << "Subscribed tx_proposed";
|
LOG(logger_.info()) << subscriber->tag() << "Subscribed tx_proposed";
|
||||||
++subAllCount_.get();
|
++subAllCount_.get();
|
||||||
subscriber->onDisconnect.connect([this](SubscriberPtr connection) { unsubInternal(connection); });
|
subscriber->onDisconnect.connect([this](SubscriberPtr connection) { unsubInternal(connection); });
|
||||||
}
|
}
|
||||||
@@ -72,7 +72,7 @@ ProposedTransactionFeed::sub(ripple::AccountID const& account, SubscriberSharedP
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (added) {
|
if (added) {
|
||||||
LOG(logger_.debug()) << subscriber->tag() << "Subscribed accounts_proposed " << account;
|
LOG(logger_.info()) << subscriber->tag() << "Subscribed accounts_proposed " << account;
|
||||||
++subAccountCount_.get();
|
++subAccountCount_.get();
|
||||||
subscriber->onDisconnect.connect([this, account](SubscriberPtr connection) {
|
subscriber->onDisconnect.connect([this, account](SubscriberPtr connection) {
|
||||||
unsubInternal(account, connection);
|
unsubInternal(account, connection);
|
||||||
@@ -129,7 +129,7 @@ void
|
|||||||
ProposedTransactionFeed::unsubInternal(SubscriberPtr subscriber)
|
ProposedTransactionFeed::unsubInternal(SubscriberPtr subscriber)
|
||||||
{
|
{
|
||||||
if (signal_.disconnect(subscriber)) {
|
if (signal_.disconnect(subscriber)) {
|
||||||
LOG(logger_.debug()) << subscriber->tag() << "Unsubscribed tx_proposed";
|
LOG(logger_.info()) << subscriber->tag() << "Unsubscribed tx_proposed";
|
||||||
--subAllCount_.get();
|
--subAllCount_.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -138,7 +138,7 @@ void
|
|||||||
ProposedTransactionFeed::unsubInternal(ripple::AccountID const& account, SubscriberPtr subscriber)
|
ProposedTransactionFeed::unsubInternal(ripple::AccountID const& account, SubscriberPtr subscriber)
|
||||||
{
|
{
|
||||||
if (accountSignal_.disconnect(subscriber, account)) {
|
if (accountSignal_.disconnect(subscriber, account)) {
|
||||||
LOG(logger_.debug()) << subscriber->tag() << "Unsubscribed accounts_proposed " << account;
|
LOG(logger_.info()) << subscriber->tag() << "Unsubscribed accounts_proposed " << account;
|
||||||
--subAccountCount_.get();
|
--subAccountCount_.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ SingleFeedBase::sub(SubscriberSharedPtr const& subscriber)
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (added) {
|
if (added) {
|
||||||
LOG(logger_.debug()) << subscriber->tag() << "Subscribed " << name_;
|
LOG(logger_.info()) << subscriber->tag() << "Subscribed " << name_;
|
||||||
++subCount_.get();
|
++subCount_.get();
|
||||||
subscriber->onDisconnect.connect([this](SubscriberPtr connectionDisconnecting) {
|
subscriber->onDisconnect.connect([this](SubscriberPtr connectionDisconnecting) {
|
||||||
unsubInternal(connectionDisconnecting);
|
unsubInternal(connectionDisconnecting);
|
||||||
@@ -83,7 +83,7 @@ void
|
|||||||
SingleFeedBase::unsubInternal(SubscriberPtr subscriber)
|
SingleFeedBase::unsubInternal(SubscriberPtr subscriber)
|
||||||
{
|
{
|
||||||
if (signal_.disconnect(subscriber)) {
|
if (signal_.disconnect(subscriber)) {
|
||||||
LOG(logger_.debug()) << subscriber->tag() << "Unsubscribed " << name_;
|
LOG(logger_.info()) << subscriber->tag() << "Unsubscribed " << name_;
|
||||||
--subCount_.get();
|
--subCount_.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ TransactionFeed::sub(SubscriberSharedPtr const& subscriber, std::uint32_t const
|
|||||||
{
|
{
|
||||||
auto const added = signal_.connectTrackableSlot(subscriber, TransactionSlot(*this, subscriber));
|
auto const added = signal_.connectTrackableSlot(subscriber, TransactionSlot(*this, subscriber));
|
||||||
if (added) {
|
if (added) {
|
||||||
LOG(logger_.debug()) << subscriber->tag() << "Subscribed transactions";
|
LOG(logger_.info()) << subscriber->tag() << "Subscribed transactions";
|
||||||
++subAllCount_.get();
|
++subAllCount_.get();
|
||||||
subscriber->apiSubVersion = apiVersion;
|
subscriber->apiSubVersion = apiVersion;
|
||||||
subscriber->onDisconnect.connect([this](SubscriberPtr connection) { unsubInternal(connection); });
|
subscriber->onDisconnect.connect([this](SubscriberPtr connection) { unsubInternal(connection); });
|
||||||
@@ -90,7 +90,7 @@ TransactionFeed::sub(
|
|||||||
{
|
{
|
||||||
auto const added = accountSignal_.connectTrackableSlot(subscriber, account, TransactionSlot(*this, subscriber));
|
auto const added = accountSignal_.connectTrackableSlot(subscriber, account, TransactionSlot(*this, subscriber));
|
||||||
if (added) {
|
if (added) {
|
||||||
LOG(logger_.debug()) << subscriber->tag() << "Subscribed account " << account;
|
LOG(logger_.info()) << subscriber->tag() << "Subscribed account " << account;
|
||||||
++subAccountCount_.get();
|
++subAccountCount_.get();
|
||||||
subscriber->apiSubVersion = apiVersion;
|
subscriber->apiSubVersion = apiVersion;
|
||||||
subscriber->onDisconnect.connect([this, account](SubscriberPtr connection) {
|
subscriber->onDisconnect.connect([this, account](SubscriberPtr connection) {
|
||||||
@@ -104,7 +104,7 @@ TransactionFeed::sub(ripple::Book const& book, SubscriberSharedPtr const& subscr
|
|||||||
{
|
{
|
||||||
auto const added = bookSignal_.connectTrackableSlot(subscriber, book, TransactionSlot(*this, subscriber));
|
auto const added = bookSignal_.connectTrackableSlot(subscriber, book, TransactionSlot(*this, subscriber));
|
||||||
if (added) {
|
if (added) {
|
||||||
LOG(logger_.debug()) << subscriber->tag() << "Subscribed book " << book;
|
LOG(logger_.info()) << subscriber->tag() << "Subscribed book " << book;
|
||||||
++subBookCount_.get();
|
++subBookCount_.get();
|
||||||
subscriber->apiSubVersion = apiVersion;
|
subscriber->apiSubVersion = apiVersion;
|
||||||
subscriber->onDisconnect.connect([this, book](SubscriberPtr connection) { unsubInternal(book, connection); });
|
subscriber->onDisconnect.connect([this, book](SubscriberPtr connection) { unsubInternal(book, connection); });
|
||||||
@@ -278,7 +278,7 @@ void
|
|||||||
TransactionFeed::unsubInternal(SubscriberPtr subscriber)
|
TransactionFeed::unsubInternal(SubscriberPtr subscriber)
|
||||||
{
|
{
|
||||||
if (signal_.disconnect(subscriber)) {
|
if (signal_.disconnect(subscriber)) {
|
||||||
LOG(logger_.debug()) << subscriber->tag() << "Unsubscribed transactions";
|
LOG(logger_.info()) << subscriber->tag() << "Unsubscribed transactions";
|
||||||
--subAllCount_.get();
|
--subAllCount_.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -287,7 +287,7 @@ void
|
|||||||
TransactionFeed::unsubInternal(ripple::AccountID const& account, SubscriberPtr subscriber)
|
TransactionFeed::unsubInternal(ripple::AccountID const& account, SubscriberPtr subscriber)
|
||||||
{
|
{
|
||||||
if (accountSignal_.disconnect(subscriber, account)) {
|
if (accountSignal_.disconnect(subscriber, account)) {
|
||||||
LOG(logger_.debug()) << subscriber->tag() << "Unsubscribed account " << account;
|
LOG(logger_.info()) << subscriber->tag() << "Unsubscribed account " << account;
|
||||||
--subAccountCount_.get();
|
--subAccountCount_.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -296,7 +296,7 @@ void
|
|||||||
TransactionFeed::unsubInternal(ripple::Book const& book, SubscriberPtr subscriber)
|
TransactionFeed::unsubInternal(ripple::Book const& book, SubscriberPtr subscriber)
|
||||||
{
|
{
|
||||||
if (bookSignal_.disconnect(subscriber, book)) {
|
if (bookSignal_.disconnect(subscriber, book)) {
|
||||||
LOG(logger_.debug()) << subscriber->tag() << "Unsubscribed book " << book;
|
LOG(logger_.info()) << subscriber->tag() << "Unsubscribed book " << book;
|
||||||
--subBookCount_.get();
|
--subBookCount_.get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,11 @@ protected:
|
|||||||
void
|
void
|
||||||
wsFail(boost::beast::error_code ec, char const* what)
|
wsFail(boost::beast::error_code ec, char const* what)
|
||||||
{
|
{
|
||||||
LOG(perfLog_.error()) << tag() << ": " << what << ": " << ec.message();
|
// Don't log if the WebSocket stream was gracefully closed at both endpoints
|
||||||
|
if (ec != boost::beast::websocket::error::closed) {
|
||||||
|
LOG(perfLog_.error()) << tag() << ": " << what << ": " << ec.message() << ": " << ec.value();
|
||||||
|
}
|
||||||
|
|
||||||
if (!ec_ && ec != boost::asio::error::operation_aborted) {
|
if (!ec_ && ec != boost::asio::error::operation_aborted) {
|
||||||
ec_ = ec;
|
ec_ = ec;
|
||||||
boost::beast::get_lowest_layer(derived().ws()).socket().close(ec);
|
boost::beast::get_lowest_layer(derived().ws()).socket().close(ec);
|
||||||
|
|||||||
Reference in New Issue
Block a user