diff options
author | djm@openbsd.org <djm@openbsd.org> | 2021-11-18 03:31:44 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2021-11-18 14:32:54 +1100 |
commit | 875408270c5a7dd69ed5449e5d85bd7120c88f70 (patch) | |
tree | fff5263529b40a4799260135b1c06197d22e1771 /ssh-agent.c | |
parent | 36b5e37030d35bbaa18ba56825b1af55971d18a0 (diff) | |
download | openssh-git-875408270c5a7dd69ed5449e5d85bd7120c88f70.tar.gz |
upstream: check for POLLHUP wherever we check for POLLIN
OpenBSD-Commit-ID: 6aa6f3ec6b17c3bd9bfec672a917f003a76d93e5
Diffstat (limited to 'ssh-agent.c')
-rw-r--r-- | ssh-agent.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ssh-agent.c b/ssh-agent.c index 48a47d45..521921fa 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-agent.c,v 1.278 2021/04/03 06:18:41 djm Exp $ */ +/* $OpenBSD: ssh-agent.c,v 1.279 2021/11/18 03:31:44 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1214,10 +1214,9 @@ after_poll(struct pollfd *pfd, size_t npfd, u_int maxfds) activefds++; break; case AUTH_CONNECTION: - if ((pfd[i].revents & (POLLIN|POLLERR)) != 0 && - handle_conn_read(socknum) != 0) { + if ((pfd[i].revents & (POLLIN|POLLHUP|POLLERR)) != 0 && + handle_conn_read(socknum) != 0) goto close_sock; - } if ((pfd[i].revents & (POLLOUT|POLLHUP)) != 0 && handle_conn_write(socknum) != 0) { close_sock: |