fix(router): handle client empty message (#1965)
* fix(router): handle client empty message * style(fmt): rustfmt
This commit is contained in:
parent
11b0210de5
commit
b0218f4d50
1 changed files with 3 additions and 3 deletions
|
|
@ -795,15 +795,15 @@ pub(crate) fn route_thread_main(
|
|||
}
|
||||
},
|
||||
None => {
|
||||
log::error!("Received empty message from client, logging client out.");
|
||||
let _ = os_input.send_to_client(
|
||||
client_id,
|
||||
ServerToClientMsg::Exit(ExitReason::Error(
|
||||
"Received empty message".to_string(),
|
||||
)),
|
||||
);
|
||||
|
||||
return Err(anyhow!("received empty message from client"))
|
||||
.with_context(err_context);
|
||||
let _ = to_server.send(ServerInstruction::RemoveClient(client_id));
|
||||
break 'route_loop;
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue