mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-17 08:44:20 +01:00
net: switch ping/pong messages to trace
they are annoying even on debug Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -7,11 +7,8 @@ use std::time::{Duration, Instant};
|
|||||||
|
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
|
||||||
use ewebsock::{WsEvent, WsMessage};
|
use ewebsock::{WsEvent, WsMessage};
|
||||||
|
use tracing::{debug, trace, error};
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
|
||||||
use tracing::{debug, error};
|
|
||||||
|
|
||||||
use super::subs_debug::SubsDebug;
|
use super::subs_debug::SubsDebug;
|
||||||
|
|
||||||
@@ -257,7 +254,7 @@ impl RelayPool {
|
|||||||
|
|
||||||
let should_ping = now - relay.last_ping > self.ping_rate;
|
let should_ping = now - relay.last_ping > self.ping_rate;
|
||||||
if should_ping {
|
if should_ping {
|
||||||
debug!("pinging {}", relay.relay.url);
|
trace!("pinging {}", relay.relay.url);
|
||||||
relay.relay.ping();
|
relay.relay.ping();
|
||||||
relay.last_ping = Instant::now();
|
relay.last_ping = Instant::now();
|
||||||
}
|
}
|
||||||
@@ -382,7 +379,7 @@ impl RelayPool {
|
|||||||
// We only need to do this natively.
|
// We only need to do this natively.
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
if let WsMessage::Ping(ref bs) = ev {
|
if let WsMessage::Ping(ref bs) = ev {
|
||||||
debug!("pong {}", relay.url());
|
trace!("pong {}", relay.url());
|
||||||
match relay {
|
match relay {
|
||||||
PoolRelay::Websocket(wsr) => {
|
PoolRelay::Websocket(wsr) => {
|
||||||
wsr.relay.sender.send(WsMessage::Pong(bs.to_owned()));
|
wsr.relay.sender.send(WsMessage::Pong(bs.to_owned()));
|
||||||
|
|||||||
Reference in New Issue
Block a user