summaryrefslogtreecommitdiffhomepage
path: root/common-session.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2014-02-17 21:41:06 +0800
committerMatt Johnston <matt@ucc.asn.au>2014-02-17 21:41:06 +0800
commitbf6f3f613d487299df5e2570984c22ad72908c28 (patch)
treec8cebde88c618edf76e231cbd0d7c19fade00a2e /common-session.c
parent0c9a643216e330911917fb1837747456d49a80b2 (diff)
Read (and enqueue) packets from interactive input even when
we're waiting for a key exchange. This should hopefully fix the situation where "~." doesn't work to terminate a client session when a laptop wakes up. The client will be stuck waiting for a key exchange on a dead connection, so won't have read the escape character
Diffstat (limited to 'common-session.c')
-rw-r--r--common-session.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/common-session.c b/common-session.c
index 6882dce..02eeaae 100644
--- a/common-session.c
+++ b/common-session.c
@@ -153,10 +153,9 @@ void session_loop(void(*loophandler)()) {
SIGCHLD in svr-chansession is the only one currently. */
FD_SET(ses.signal_pipe[0], &readfd);
- /* set up for channels which require reading/writing */
- if (ses.dataallowed) {
- setchannelfds(&readfd, &writefd);
- }
+ /* set up for channels which can be read/written */
+ setchannelfds(&readfd, &writefd);
+
val = select(ses.maxfd+1, &readfd, &writefd, NULL, &timeout);
if (exitflag) {
@@ -217,9 +216,7 @@ void session_loop(void(*loophandler)()) {
/* process pipes etc for the channels, ses.dataallowed == 0
* during rekeying ) */
- if (ses.dataallowed) {
- channelio(&readfd, &writefd);
- }
+ channelio(&readfd, &writefd);
if (loophandler) {
loophandler();