Hi,
Sorry for the late response.
We were able to reproduce the situation you described. It appears to be an issue on Windows related to the way Ice is shutting down a connection.
We have fixed this problem for the next release. Meanwhile, you can apply this fix yourself quite easily by editing src/Ice/ConnectionI.cpp and commenting out line 1701, which is shown below:
Code:
_transceiver->shutdownWrite();
There are a couple of issues you need to be aware of, however. First, you must not implement a servant operation which does the following:
Code:
void MyServant::myOp(const Ice::Current& current)
{
current.adapter->deactivate();
current.adapter->waitForDeactivate();
}
This causes a deadlock because deactivation does not complete until all outstanding requests have been processed, yet this invocation of myOp does not complete.
Second, performing an orderly shutdown in an Ice program requires the cooperation of the program's peers (in the absence of timeouts). In the situation you've described, where shutdown is initiated on a server's adapter while a client is in the process of (slowly) sending a request, the server sends a "close connection" message to the client and waits for the client to close the connection. While the server is waiting, it continues to read (and ignore) anything sent by the client.
Meanwhile, the multithreaded nature of the client means that one thread is busy sending the request when another thread receives and attempts to act on the close connection message. However, the client will wait until the request has been sent completely before it closes the connection.
The net result is that the server's adapter does not complete its deactivation until the client finishes sending its request. If this behavior is not acceptable, you will have to use timeouts.
Take care,
- Mark