diff options
author | Brian Hinz <bphinz@users.sourceforge.net> | 2012-03-19 20:20:24 +0000 |
---|---|---|
committer | Brian Hinz <bphinz@users.sourceforge.net> | 2012-03-19 20:20:24 +0000 |
commit | 84c9467b8e8a8e9cf2bb24944fec4bb91d4caeb8 (patch) | |
tree | 981f5e16b2ac04a4eac25f18dd6f5cfe6d82d242 /java/com/tigervnc/rfb/CConnection.java | |
parent | 35022e07a90807f5f0686c146e49f469d4b3f2fd (diff) | |
download | tigervnc-84c9467b8e8a8e9cf2bb24944fec4bb91d4caeb8.tar.gz tigervnc-84c9467b8e8a8e9cf2bb24944fec4bb91d4caeb8.zip |
Fixes handshake failure caused by premature loop break when data is not ready.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4872 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java/com/tigervnc/rfb/CConnection.java')
-rw-r--r-- | java/com/tigervnc/rfb/CConnection.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/java/com/tigervnc/rfb/CConnection.java b/java/com/tigervnc/rfb/CConnection.java index 1e55f043..e5392a1d 100644 --- a/java/com/tigervnc/rfb/CConnection.java +++ b/java/com/tigervnc/rfb/CConnection.java @@ -74,12 +74,11 @@ abstract public class CConnection extends CMsgHandler { private void processVersionMsg() { vlog.debug("reading protocol version"); - Boolean done = new Boolean(true); - if (!cp.readVersion(is, done)) { + if (!cp.readVersion(is)) { state_ = RFBSTATE_INVALID; throw new Exception("reading version failed: not an RFB server?"); } - if (!done.booleanValue()) return; + if (!cp.done) return; vlog.info("Server supports RFB protocol version " +cp.majorVersion+"."+ cp.minorVersion); |