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 22, 2024
1 parent ada0187 commit 61193fe
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions glide-core/src/socket_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,20 @@ async fn listen_on_client_stream(socket: UnixStream) {
let _res = write_closing_error(ClosingError { err_message }, u32::MAX, &writer).await;
return;
}
Err(e @ ClientCreationError::UnhandledError(_))
| Err(e @ ClientCreationError::IO(_))
| Err(e @ ClientCreationError::ConnectionError(_)) => {
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));
let err_message = e.to_string();
let _res = write_closing_error(ClosingError { err_message }, u32::MAX, &writer).await;
return;
Expand All @@ -615,6 +626,7 @@ 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).await;
};
Expand Down

0 comments on commit 61193fe

Please sign in to comment.