File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10+ ### Fixed
11+
12+ - Don't panic when receiving acks from disconnected clients (backends might not discard messages immediately, allowing to react to them).
13+
1014## [ 0.39.4] - 2026-04-08
1115
1216### Fixed
Original file line number Diff line number Diff line change @@ -351,14 +351,13 @@ fn receive_acks(
351351 mut clients : Query < & mut ClientTicks > ,
352352) {
353353 for ( client, mut message) in messages. receive ( ClientChannel :: MutationAcks ) {
354+ let Ok ( mut ticks) = clients. get_mut ( client) else {
355+ debug ! ( "ignoring acks for disconnected client `{client}`" ) ;
356+ continue ;
357+ } ;
354358 while message. has_remaining ( ) {
355359 match postcard_utils:: from_buf ( & mut message) {
356360 Ok ( mutate_index) => {
357- let mut ticks = clients. get_mut ( client) . unwrap_or_else ( |_| {
358- panic ! (
359- "messages from client `{client}` should have been removed on disconnect"
360- )
361- } ) ;
362361 if let Some ( entities) = ticks. ack_mutate_message ( client, mutate_index) {
363362 pools. recycle_entities ( entities) ;
364363 }
You can’t perform that action at this time.
0 commit comments