diff --git a/yama/src/remote/responder.rs b/yama/src/remote/responder.rs index 242ba8d..8bbe04f 100644 --- a/yama/src/remote/responder.rs +++ b/yama/src/remote/responder.rs @@ -7,7 +7,7 @@ use std::thread::JoinHandle; use anyhow::anyhow; use crossbeam_channel::{Receiver, Sender}; use itertools::Itertools; -use log::{error, warn}; +use log::{error, info, warn}; use crate::pile::RawPile; use crate::remote::{read_message, write_message, Request, RequestBody, Response, ResponseBody}; @@ -80,6 +80,11 @@ impl Responder { let request: Request = read_message(&mut read)?; match request.body { + RequestBody::Shutdown => { + worker_queue_send.send(request)?; + info!("Shutting down responder"); + return Ok(()); + } RequestBody::NextBatch { token } => { let tokens = self .continuation_tokens @@ -277,13 +282,10 @@ impl Responder { } } }, - RequestBody::Shutdown => { - warn!("Not yet implemented: Shutdown"); - Response { - response_to: request.id, - body: ResponseBody::Success, - } - } + RequestBody::Shutdown => Response { + response_to: request.id, + body: ResponseBody::Success, + }, }; responses