mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix server panic
This commit is contained in:
parent
4022937da7
commit
3c4829bc4a
@ -193,13 +193,14 @@ impl Client {
|
||||
&self,
|
||||
stream_id: u8,
|
||||
) -> Result<Option<M>, StreamError> {
|
||||
// TODO: are two systems using the same stream?? why is there contention here?
|
||||
match stream_id {
|
||||
0 => self.register_stream.try_lock().unwrap().try_recv(),
|
||||
1 => self.character_screen_stream.try_lock().unwrap().try_recv(),
|
||||
2 => self.in_game_stream.try_lock().unwrap().try_recv(),
|
||||
3 => self.general_stream.try_lock().unwrap().try_recv(),
|
||||
4 => self.ping_stream.try_lock().unwrap().try_recv(),
|
||||
5 => self.terrain_stream.try_lock().unwrap().try_recv(),
|
||||
0 => self.register_stream.lock().unwrap().try_recv(),
|
||||
1 => self.character_screen_stream.lock().unwrap().try_recv(),
|
||||
2 => self.in_game_stream.lock().unwrap().try_recv(),
|
||||
3 => self.general_stream.lock().unwrap().try_recv(),
|
||||
4 => self.ping_stream.lock().unwrap().try_recv(),
|
||||
5 => self.terrain_stream.lock().unwrap().try_recv(),
|
||||
_ => unreachable!("invalid stream id"),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user