aboutsummaryrefslogtreecommitdiff
path: root/planetwars-matchrunner/src/docker_runner.rs
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-09-24 23:37:23 +0200
committerIlion Beyst <ilion.beyst@gmail.com>2022-09-24 23:37:23 +0200
commitf7261e165bda87dae49c879bdac850479cc20c19 (patch)
tree19ce531bcd0476e721890e80d3fdbe085709cd29 /planetwars-matchrunner/src/docker_runner.rs
parente86fbc7275c036cefe75d7c46b0f11898bde1c6c (diff)
downloadplanetwars.dev-f7261e165bda87dae49c879bdac850479cc20c19.tar.xz
planetwars.dev-f7261e165bda87dae49c879bdac850479cc20c19.zip
detect bot crashes
Diffstat (limited to 'planetwars-matchrunner/src/docker_runner.rs')
-rw-r--r--planetwars-matchrunner/src/docker_runner.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/planetwars-matchrunner/src/docker_runner.rs b/planetwars-matchrunner/src/docker_runner.rs
index 939d734..a4415ca 100644
--- a/planetwars-matchrunner/src/docker_runner.rs
+++ b/planetwars-matchrunner/src/docker_runner.rs
@@ -207,8 +207,9 @@ impl DockerBotRunner {
let result = timeout(request.timeout, resp_fut).await;
let request_response = match result {
Ok(Ok(response)) => Ok(response.to_vec()),
- // this one happens when a bot output stream ends, map this to Timeout for now
- Ok(Err(_read_error)) => Err(RequestError::Timeout),
+ // Read failed.
+ // TODO: better logging for errors
+ Ok(Err(_read_error)) => Err(RequestError::BotTerminated),
Err(_elapsed) => Err(RequestError::Timeout),
};
let request_id = (self.player_id, request.request_id);