diff options
author | Benoit Foucher <benoit@zeroc.com> | 2017-01-18 19:16:02 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2017-01-18 19:16:02 +0100 |
commit | 4baf696c7156c9f300a33d9041bd677c574b6e14 (patch) | |
tree | 15d736254302f6b01260134a97f3bdfc04ff9738 /csharp/src/Ice/ThreadPool.cs | |
parent | Fixed bug introduced by previous commit (diff) | |
download | ice-4baf696c7156c9f300a33d9041bd677c574b6e14.tar.bz2 ice-4baf696c7156c9f300a33d9041bd677c574b6e14.tar.xz ice-4baf696c7156c9f300a33d9041bd677c574b6e14.zip |
Fixed ICE-2802 - no longer halt when running out of FDs
Diffstat (limited to 'csharp/src/Ice/ThreadPool.cs')
-rw-r--r-- | csharp/src/Ice/ThreadPool.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/csharp/src/Ice/ThreadPool.cs b/csharp/src/Ice/ThreadPool.cs index b5e51d7d554..17610a2fd58 100644 --- a/csharp/src/Ice/ThreadPool.cs +++ b/csharp/src/Ice/ThreadPool.cs @@ -297,7 +297,12 @@ namespace IceInternal public void initialize(EventHandler handler) { - // Nothing to do. + handler._ready = 0; + handler._pending = 0; + handler._started = 0; + handler._finish = false; + handler._hasMoreData = false; + handler._registered = 0; } public void register(EventHandler handler, int op) @@ -355,12 +360,13 @@ namespace IceInternal { Debug.Assert(!_destroyed); + handler._registered = SocketOperation.None; + // // If there are no pending asynchronous operations, we can call finish on the handler now. // if(handler._pending == 0) { - handler._registered = SocketOperation.None; executeNonBlocking(() => { ThreadPoolCurrent current = new ThreadPoolCurrent(this, handler, SocketOperation.None); |