mirror of
https://github.com/mikedilger/chorus.git
synced 2026-05-03 06:51:42 +00:00
client trace messages
This commit is contained in:
parent
e42a18efce
commit
f6dbf63e64
@ -368,6 +368,8 @@ struct WebSocketService {
|
||||
|
||||
impl WebSocketService {
|
||||
async fn send(&mut self, m: Message) -> Result<(), Error> {
|
||||
log::trace!(target: "Client", "{}: {}", self.peer, m);
|
||||
|
||||
// Throttling: we consume burst tokens, but we do not throttle on output
|
||||
if m.len() > self.burst_tokens {
|
||||
log::info!(target: "Client", "{}: Rate limited exceeded", self.peer);
|
||||
|
||||
@ -18,6 +18,8 @@ impl WebSocketService {
|
||||
self.buffer.resize(newlen, 0);
|
||||
}
|
||||
|
||||
log::trace!(target: "Client", "{}: {}", self.peer, msg);
|
||||
|
||||
let input = msg.as_bytes();
|
||||
let mut inpos = 0;
|
||||
eat_whitespace(input, &mut inpos);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user