Fixed mask
This commit is contained in:
@@ -47,9 +47,6 @@ async fn main() -> session_rs::Result<()> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let _ = session.close().await;
|
|
||||||
println!("Connection {} closed", addr);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -143,7 +143,7 @@ impl Session {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// --- 3. Read mask key ---
|
// --- 3. Read mask key ---
|
||||||
if !masked {
|
if !masked && !self.mask_payload {
|
||||||
// Per spec, client-to-server frames MUST be masked
|
// Per spec, client-to-server frames MUST be masked
|
||||||
self.close().await.ok();
|
self.close().await.ok();
|
||||||
return Err(crate::Error::InvalidFrame(
|
return Err(crate::Error::InvalidFrame(
|
||||||
|
|||||||
Reference in New Issue
Block a user