Mercurial > dropbear
diff common-session.c @ 1060:4c733310c21d nocircbuffer
reword comment for clarity
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 01 Mar 2015 23:26:42 +0800 |
parents | c2a50c9f509e |
children | 2fa71c3b2827 10f198d4a308 |
line wrap: on
line diff
--- a/common-session.c Sun Mar 01 23:02:06 2015 +0800 +++ b/common-session.c Sun Mar 01 23:26:42 2015 +0800 @@ -152,8 +152,10 @@ FD_ZERO(&readfd); dropbear_assert(ses.payload == NULL); - /* during initial setup we flush out the KEXINIT packet before - * attempting to read the remote version string, which might block */ + /* We delay reading from the input socket during initial setup until + after we have written out our initial KEXINIT packet (empty writequeue). + This means our initial packet can be in-flight while we're doing a blocking + read for the remote ident */ if (ses.sock_in != -1 && (ses.remoteident || isempty(&ses.writequeue))) { FD_SET(ses.sock_in, &readfd); }