Skip to content

Commit

Permalink
Experiment
Browse files Browse the repository at this point in the history
Signed-off-by: Yury-Fridlyand <[email protected]>
  • Loading branch information
Yury-Fridlyand committed Jan 23, 2024
1 parent 77da4bd commit d7647c5
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions glide-core/src/socket_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -621,20 +621,9 @@ async fn listen_on_client_stream(socket: UnixStream) {
.await;
return;
}
Err(e @ ClientCreationError::UnhandledError(_)) => {
log_error("ClientCreationError - UnhandledError", format!("{:?}", e));
let err_message = e.to_string();
let _res = write_closing_error(ClosingError { err_message }, u32::MAX, &writer).await;
return;
}
Err(e @ ClientCreationError::IO(_)) => {
log_error("ClientCreationError - IO", format!("{:?}", e));
let err_message = e.to_string();
let _res = write_closing_error(ClosingError { err_message }, u32::MAX, &writer).await;
return;
}
Err(e @ ClientCreationError::ConnectionError(_)) => {
log_error("ClientCreationError - ConnectionError", format!("{:?}", e));
Err(e @ ClientCreationError::UnhandledError(_))
| Err(e @ ClientCreationError::IO(_))
| Err(e @ ClientCreationError::ConnectionError(_)) => {
let err_message = e.to_string();
log_error("client creation", &err_message);
let _res = write_closing_error(
Expand All @@ -650,7 +639,6 @@ async fn listen_on_client_stream(socket: UnixStream) {
log_info("connection", "new connection started");
tokio::select! {
reader_closing = read_values_loop(client_listener, &client, writer.clone()) => {
log_error("reader_closing", "BOOM");
if let ClosingReason::UnhandledError(err) = reader_closing {
let _res = write_closing_error(ClosingError{err_message: err.to_string()}, u32::MAX, &writer, "client closing").await;
};
Expand Down

0 comments on commit d7647c5

Please sign in to comment.