Mercurial > 510Connectbot
comparison src/ch/ethz/ssh2/transport/ClientServerHello.java @ 334:097cfe8770dd ganymed
still hangs during connection
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 31 Jul 2014 14:33:20 -0700 |
parents | 071eccdff8ea |
children | e25e377d29d3 |
comparison
equal
deleted
inserted
replaced
333:d835e842d158 | 334:097cfe8770dd |
---|---|
40 throws IOException { | 40 throws IOException { |
41 String localIdentifier = String.format("SSH-2.0-%s", softwareversion); | 41 String localIdentifier = String.format("SSH-2.0-%s", softwareversion); |
42 bo.write(StringEncoder.GetBytes(String.format("%s\r\n", localIdentifier))); | 42 bo.write(StringEncoder.GetBytes(String.format("%s\r\n", localIdentifier))); |
43 bo.flush(); | 43 bo.flush(); |
44 // Expect SSH-protoversion-softwareversion SP comments CR LF | 44 // Expect SSH-protoversion-softwareversion SP comments CR LF |
45 String remoteIdentifier = new LineNumberReader(new InputStreamReader(bi)).readLine(); | 45 InputStreamReader isr = new InputStreamReader(bi); |
46 LineNumberReader lnr = new LineNumberReader(isr); | |
47 String remoteIdentifier = lnr.readLine(); | |
48 if (!bi.ready() && lnr.ready()) { | |
49 int a= 1; // break | |
50 } | |
46 | 51 |
47 if (null == remoteIdentifier) { | 52 if (null == remoteIdentifier) { |
48 throw new IOException("Premature connection close"); | 53 throw new IOException("Premature connection close"); |
49 } | 54 } |
50 | 55 |