Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions crates/ironposh-async/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ async fn run_handshake<C: HttpClient>(
let step_result = match step_result {
Ok(result) => result,
Err(e) => {
let _ =
session_event_tx.unbounded_send(crate::SessionEvent::Error(e.to_string()));
let _ = session_event_tx.unbounded_send(crate::SessionEvent::Error(e.to_string()));
return Err(e);
}
};
Expand Down Expand Up @@ -71,9 +70,10 @@ fn build_pipeline_multiplexer(
mut pipeline_input_rx: mpsc::Receiver<PipelineInput>,
span_prefix: &'static str,
) -> impl std::future::Future<Output = anyhow::Result<()>> {
let pipeline_map = Arc::new(futures::lock::Mutex::new(
std::collections::HashMap::<uuid::Uuid, mpsc::Sender<UserEvent>>::new(),
));
let pipeline_map = Arc::new(futures::lock::Mutex::new(std::collections::HashMap::<
uuid::Uuid,
mpsc::Sender<UserEvent>,
>::new()));

let pipeline_map_clone = Arc::clone(&pipeline_map);

Expand Down Expand Up @@ -151,7 +151,11 @@ fn build_pipeline_multiplexer(

Ok::<(), anyhow::Error>(())
}
.instrument(span!(Level::INFO, "PipelineInputLoop", prefix = user_span_name));
.instrument(span!(
Level::INFO,
"PipelineInputLoop",
prefix = user_span_name
));

let (x, y) = join!(from_server, from_user);
x.and(y)
Expand Down Expand Up @@ -222,8 +226,12 @@ where
.instrument(info_span!("MainTask"));

let (pipeline_input_tx, pipeline_input_rx) = mpsc::channel(100);
let multiplex_pipeline_task =
build_pipeline_multiplexer(user_input_tx, server_output_rx, pipeline_input_rx, "Parallel");
let multiplex_pipeline_task = build_pipeline_multiplexer(
user_input_tx,
server_output_rx,
pipeline_input_rx,
"Parallel",
);

let joined_task = async move {
let res = join!(active_session_task, multiplex_pipeline_task);
Expand Down
4 changes: 3 additions & 1 deletion crates/ironposh-async/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,9 @@ async fn process_session_outputs(
| ActiveSessionOutput::SendAndThenReceive { .. }
| ActiveSessionOutput::PendingReceive { .. } => {
// This should be handled at the caller level
warn!("SendBack/SendAndThenReceive/PendingReceive should not reach process_session_outputs");
warn!(
"SendBack/SendAndThenReceive/PendingReceive should not reach process_session_outputs"
);
}
ActiveSessionOutput::SendBackError(e) => {
error!(target: "session", error = %e, "session step failed");
Expand Down
570 changes: 0 additions & 570 deletions crates/ironposh-async/src/session_serial.rs

This file was deleted.

Loading