Undo some changes
This commit is contained in:
parent
aef52b0690
commit
75b07cc6c8
2 changed files with 6 additions and 8 deletions
|
|
@ -209,7 +209,7 @@ pub fn start(mut os_input: Box<dyn OsApi>, opts: CliArgs, config: Config) {
|
||||||
let send_app_instructions =
|
let send_app_instructions =
|
||||||
SenderWithContext::new(SenderType::SyncSender(send_app_instructions));
|
SenderWithContext::new(SenderType::SyncSender(send_app_instructions));
|
||||||
|
|
||||||
let ipc_thread = start_server(
|
let pty_thread = start_server(
|
||||||
os_input.clone(),
|
os_input.clone(),
|
||||||
opts.clone(),
|
opts.clone(),
|
||||||
command_is_executing.clone(),
|
command_is_executing.clone(),
|
||||||
|
|
@ -566,7 +566,7 @@ pub fn start(mut os_input: Box<dyn OsApi>, opts: CliArgs, config: Config) {
|
||||||
}
|
}
|
||||||
AppInstruction::Error(backtrace) => {
|
AppInstruction::Error(backtrace) => {
|
||||||
let _ = send_server_instructions.send(ApiCommand::Quit);
|
let _ = send_server_instructions.send(ApiCommand::Quit);
|
||||||
let _ = ipc_thread.join();
|
let _ = pty_thread.join();
|
||||||
//IpcSenderWithContext::new().send(ApiCommand::Quit);
|
//IpcSenderWithContext::new().send(ApiCommand::Quit);
|
||||||
let _ = send_screen_instructions.send(ScreenInstruction::Quit);
|
let _ = send_screen_instructions.send(ScreenInstruction::Quit);
|
||||||
let _ = screen_thread.join();
|
let _ = screen_thread.join();
|
||||||
|
|
@ -595,7 +595,7 @@ pub fn start(mut os_input: Box<dyn OsApi>, opts: CliArgs, config: Config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
let _ = send_server_instructions.send(ApiCommand::Quit);
|
let _ = send_server_instructions.send(ApiCommand::Quit);
|
||||||
let _ = ipc_thread.join().unwrap();
|
let _ = pty_thread.join().unwrap();
|
||||||
//IpcSenderWithContext::new().send(ApiCommand::Quit);
|
//IpcSenderWithContext::new().send(ApiCommand::Quit);
|
||||||
let _ = send_screen_instructions.send(ScreenInstruction::Quit);
|
let _ = send_screen_instructions.send(ScreenInstruction::Quit);
|
||||||
screen_thread.join().unwrap();
|
screen_thread.join().unwrap();
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ pub fn start_server(
|
||||||
command_is_executing.done_closing_pane();
|
command_is_executing.done_closing_pane();
|
||||||
}
|
}
|
||||||
PtyInstruction::Quit => {
|
PtyInstruction::Quit => {
|
||||||
//break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -146,8 +146,6 @@ pub fn start_server(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//let _ = pty_thread.join();
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
@ -160,10 +158,10 @@ fn handle_stream(
|
||||||
mut stream: LocalSocketStream,
|
mut stream: LocalSocketStream,
|
||||||
km: u32,
|
km: u32,
|
||||||
) {
|
) {
|
||||||
//let mut reader = BufReader::new(stream);
|
let mut reader = BufReader::new(stream);
|
||||||
let mut buffer = [0; 65535]; // TODO: more accurate
|
let mut buffer = [0; 65535]; // TODO: more accurate
|
||||||
loop {
|
loop {
|
||||||
let bytes = stream
|
let bytes = reader
|
||||||
.read(&mut buffer)
|
.read(&mut buffer)
|
||||||
.expect("failed to parse ipc message");
|
.expect("failed to parse ipc message");
|
||||||
let (mut err_ctx, decoded): (ErrorContext, ApiCommand) =
|
let (mut err_ctx, decoded): (ErrorContext, ApiCommand) =
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue