mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-07 00:00:12 +02:00
Fix comment spacing in websocket example
This commit is contained in:
@@ -99,7 +99,7 @@ async fn ws_handler(
|
|||||||
|
|
||||||
/// Actual websocket statemachine (one will be spawned per connection)
|
/// Actual websocket statemachine (one will be spawned per connection)
|
||||||
async fn handle_socket(mut socket: WebSocket, who: SocketAddr) {
|
async fn handle_socket(mut socket: WebSocket, who: SocketAddr) {
|
||||||
//send a ping (unsupported by some browsers) just to kick things off and get a response
|
// send a ping (unsupported by some browsers) just to kick things off and get a response
|
||||||
if socket.send(Message::Ping(vec![1, 2, 3])).await.is_ok() {
|
if socket.send(Message::Ping(vec![1, 2, 3])).await.is_ok() {
|
||||||
println!("Pinged {who}...");
|
println!("Pinged {who}...");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user