diff options
Diffstat (limited to 'java-compat/src')
-rw-r--r-- | java-compat/src/Ice/src/main/java/Ice/ConnectionI.java | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/java-compat/src/Ice/src/main/java/Ice/ConnectionI.java b/java-compat/src/Ice/src/main/java/Ice/ConnectionI.java index 85d7b141361..bd4879c1ed9 100644 --- a/java-compat/src/Ice/src/main/java/Ice/ConnectionI.java +++ b/java-compat/src/Ice/src/main/java/Ice/ConnectionI.java @@ -1138,6 +1138,16 @@ public final class ConnectionI extends IceInternal.EventHandler { throw new Ice.IllegalMessageSizeException(); } + + // + // Connection is validated on first message. This is only used by + // setState() to check wether or not we can print a connection + // warning (a client might close the connection forcefully if the + // connection isn't validated, we don't want to print a warning + // in this case). + // + _validated = true; + if(size > _messageSizeMax) { IceInternal.Ex.throwMemoryLimitException(size, _messageSizeMax); @@ -2283,6 +2293,8 @@ public final class ConnectionI extends IceInternal.EventHandler observerFinishRead(_readStream.getBuffer()); } + _validated = true; + assert (_readStream.pos() == IceInternal.Protocol.headerSize); _readStream.pos(0); byte[] m = _readStream.readBlob(4); @@ -2313,8 +2325,6 @@ public final class ConnectionI extends IceInternal.EventHandler throw new IllegalMessageSizeException(); } IceInternal.TraceUtil.traceRecv(_readStream, _logger, _traceLevels); - - _validated = true; } } @@ -2613,14 +2623,6 @@ public final class ConnectionI extends IceInternal.EventHandler assert (info.stream.pos() == info.stream.size()); - // - // Connection is validated on first message. This is only used by - // setState() to check wether or not we can print a connection - // warning (a client might close the connection forcefully if the - // connection isn't validated). - // - _validated = true; - try { // |