summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2012-02-19 10:42:39 -0800
committerRuss Allbery <rra@stanford.edu>2012-02-19 10:42:39 -0800
commit58dc79b9ad6c79ab05bb935e478602c1b7e1eb97 (patch)
tree8cf7443c78fc949b6068d9cfa2d30cbab5a5b950 /client
parentb071bad600dd9ff4043864f2d83cadcaa048c441 (diff)
Also close protocol v1 connections on timeout
Similar to what we do for protocol v2. This isn't as important for protocol v1, since we only send one command anyway, but it's still more correct. Change-Id: I01338e0f592fd508f56af3c8b840229fbf849370
Diffstat (limited to 'client')
-rw-r--r--client/client-v1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/client-v1.c b/client/client-v1.c
index 16691e2..b4f2c75 100644
--- a/client/client-v1.c
+++ b/client/client-v1.c
@@ -116,7 +116,7 @@ internal_v1_output(struct remctl *r)
TOKEN_MAX_LENGTH, r->timeout, &major, &minor);
if (status != TOKEN_OK) {
internal_token_error(r, "receiving token", status, major, minor);
- if (status == TOKEN_FAIL_EOF) {
+ if (status == TOKEN_FAIL_EOF || status == TOKEN_FAIL_TIMEOUT) {
socket_close(r->fd);
r->fd = INVALID_SOCKET;
}