diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-01-22 15:19:02 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-01-22 15:19:02 +0100 |
commit | 3994b371119ba308c6c4f27475c1b16a1fc518eb (patch) | |
tree | 476d2e9180d79e3910430b1396431d93c43bb180 /java/src/IceInternal/ThreadPool.java | |
parent | More fixes for bug3504 and fixed bug3506 (diff) | |
download | ice-3994b371119ba308c6c4f27475c1b16a1fc518eb.tar.bz2 ice-3994b371119ba308c6c4f27475c1b16a1fc518eb.tar.xz ice-3994b371119ba308c6c4f27475c1b16a1fc518eb.zip |
Fixed bug 3484 & 3604
Diffstat (limited to 'java/src/IceInternal/ThreadPool.java')
-rw-r--r-- | java/src/IceInternal/ThreadPool.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/java/src/IceInternal/ThreadPool.java b/java/src/IceInternal/ThreadPool.java index 78316f1f910..ea80b046a77 100644 --- a/java/src/IceInternal/ThreadPool.java +++ b/java/src/IceInternal/ThreadPool.java @@ -524,6 +524,8 @@ public final class ThreadPool } catch(Ice.DatagramLimitException ex) // Expected. { + handler._stream.pos(0); + handler._stream.resize(0, true); continue; } catch(Ice.SocketException ex) @@ -548,6 +550,8 @@ public final class ThreadPool _instance.initializationData().logger.warning( "datagram connection exception:\n" + ex + "\n" + handler.toString()); } + handler._stream.pos(0); + handler._stream.resize(0, true); } else { @@ -718,6 +722,16 @@ public final class ThreadPool { BasicStream stream = handler._stream; + if(stream.pos() >= Protocol.headerSize) + { + if(!handler.read(stream)) + { + return false; + } + assert(stream.pos() == stream.size()); + return true; + } + if(stream.size() == 0) { stream.resize(Protocol.headerSize, true); @@ -805,8 +819,6 @@ public final class ThreadPool _instance.initializationData().logger.warning("DatagramLimitException: maximum size of " + stream.pos() + " exceeded"); } - stream.pos(0); - stream.resize(0, true); throw new Ice.DatagramLimitException(); } else |