diff options
author | metamuffin <metamuffin@disroot.org> | 2024-09-02 01:56:48 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-09-02 14:18:02 +0200 |
commit | 84e2b868e87043f4e3844738f4e1c2a7bcbb96c0 (patch) | |
tree | e3c86d15d5b68c816a56b30c7c8fc99e8a01059c /server/src/main.rs | |
parent | c273af0311b0676dd6bb1bcfc600474508afd125 (diff) | |
download | hurrycurry-84e2b868e87043f4e3844738f4e1c2a7bcbb96c0.tar hurrycurry-84e2b868e87043f4e3844738f4e1c2a7bcbb96c0.tar.bz2 hurrycurry-84e2b868e87043f4e3844738f4e1c2a7bcbb96c0.tar.zst |
rephrase some messages in server
Diffstat (limited to 'server/src/main.rs')
-rw-r--r-- | server/src/main.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/server/src/main.rs b/server/src/main.rs index 797e21f9..8a54d7f3 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -116,7 +116,7 @@ async fn run(addr: SocketAddr) -> anyhow::Result<()> { loop { tick.tick().await; if let Err(e) = state.write().await.tick_outer(dt).await { - warn!("tick failed: {e}"); + warn!("Tick failed: {e}"); } } }); @@ -125,7 +125,7 @@ async fn run(addr: SocketAddr) -> anyhow::Result<()> { for id in (1..).map(ConnectionID) { let (sock, addr) = ws_listener.accept().await?; let Ok(sock) = tokio_tungstenite::accept_async(sock).await else { - warn!("invalid ws handshake"); + warn!("Invalid ws handshake"); continue; }; info!("{addr} connected via websocket"); @@ -156,7 +156,7 @@ async fn run(addr: SocketAddr) -> anyhow::Result<()> { )) .await { - warn!("ws error on init: {e}"); + warn!("WebSocket error when sending initial packets: {e}"); return; } } @@ -166,7 +166,7 @@ async fn run(addr: SocketAddr) -> anyhow::Result<()> { Ok(e) => e, Err(e) => { rx = rx.resubscribe(); - warn!("client was lagging. resubscribed: {e}"); + warn!("Client was lagging; resubscribed: {e}"); PacketC::ServerMessage { text: "Lagging behind. Some clientbound packets were dropped." .to_string(), @@ -175,7 +175,7 @@ async fn run(addr: SocketAddr) -> anyhow::Result<()> { }), p = error_rx.recv() => p ) else { - info!("client outbound sender dropped. closing connection"); + info!("Client outbound sender dropped. closing connection"); break; }; let message = if supports_binary.load(Ordering::Relaxed) { @@ -184,7 +184,7 @@ async fn run(addr: SocketAddr) -> anyhow::Result<()> { Message::Text(serde_json::to_string(&packet).unwrap()) }; if let Err(e) = write.send(message).await { - warn!("ws error: {e}"); + warn!("WebSocket error: {e}"); break; } } @@ -197,7 +197,7 @@ async fn run(addr: SocketAddr) -> anyhow::Result<()> { Message::Text(line) => match serde_json::from_str(&line) { Ok(p) => p, Err(e) => { - warn!("invalid json packet: {e}"); + warn!("Invalid json packet: {e}"); break; } }, @@ -206,7 +206,7 @@ async fn run(addr: SocketAddr) -> anyhow::Result<()> { match bincode::decode_from_slice::<PacketS, _>(&packet, BINCODE_CONFIG) { Ok((p, _size)) => p, Err(e) => { - warn!("invalid binary packet: {e}"); + warn!("Invalid binary packet: {e}"); break; } } @@ -226,7 +226,7 @@ async fn run(addr: SocketAddr) -> anyhow::Result<()> { let packet_out = match state.write().await.packet_in_outer(id, packet).await { Ok(packets) => packets, Err(e) => { - warn!("client error: {e}"); + warn!("Client error: {e}"); vec![PacketC::Error { message: format!("{e}"), }] |