From 875408270c5a7dd69ed5449e5d85bd7120c88f70 Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Thu, 18 Nov 2021 03:31:44 +0000 Subject: upstream: check for POLLHUP wherever we check for POLLIN OpenBSD-Commit-ID: 6aa6f3ec6b17c3bd9bfec672a917f003a76d93e5 --- ssh-agent.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ssh-agent.c') 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 * Copyright (c) 1995 Tatu Ylonen , 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: -- cgit v1.2.1