summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2012-02-19 10:38:18 -0800
committerRuss Allbery <rra@stanford.edu>2012-02-19 10:38:18 -0800
commitdb95a8aa1c4dc9fde2dca643aff5017903dbe07c (patch)
tree2865cb2707827917453270dba25b7491dd437565 /client
parent16cae416b11482468d024a009acf55c063ffafc7 (diff)
Close the server connection on timeout
Similar to with EOF, a timeout talking to the server is not recoverable. Close the connection so that if we send more commands we'll open a new server connection. Change-Id: Ic9ab732f70a4df52ed6fed5f62f8a9033a6b0e24
Diffstat (limited to 'client')
-rw-r--r--client/client-v2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/client-v2.c b/client/client-v2.c
index 824e2cf..82e9217 100644
--- a/client/client-v2.c
+++ b/client/client-v2.c
@@ -202,7 +202,7 @@ internal_v2_read_token(struct remctl *r, gss_buffer_t token)
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;
}