summaryrefslogtreecommitdiff
path: root/csharp/src/Ice/ConnectionFactory.cs
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2018-11-12 13:16:10 +0100
committerBenoit Foucher <benoit@zeroc.com>2018-11-12 13:16:10 +0100
commit17543bdb79d56062d05491229f492feaa7a1eaa5 (patch)
tree53e39686bb4aa8d448aaf8ecab1b189c28e62643 /csharp/src/Ice/ConnectionFactory.cs
parentFixed bogus whitespaces (diff)
downloadice-17543bdb79d56062d05491229f492feaa7a1eaa5.tar.bz2
ice-17543bdb79d56062d05491229f492feaa7a1eaa5.tar.xz
ice-17543bdb79d56062d05491229f492feaa7a1eaa5.zip
Fixed rare race condition which could trigger an assert on OA destruction, fixes #291
Diffstat (limited to 'csharp/src/Ice/ConnectionFactory.cs')
-rw-r--r--csharp/src/Ice/ConnectionFactory.cs13
1 files changed, 4 insertions, 9 deletions
diff --git a/csharp/src/Ice/ConnectionFactory.cs b/csharp/src/Ice/ConnectionFactory.cs
index 091c0eae16a..fdfe0485537 100644
--- a/csharp/src/Ice/ConnectionFactory.cs
+++ b/csharp/src/Ice/ConnectionFactory.cs
@@ -1507,6 +1507,10 @@ namespace IceInternal
{
if(_state < StateClosed)
{
+ //
+ // If the acceptor got closed because of an un-expected error, try to restart it in 1 second.
+ //
+ _instance.timer().schedule(new StartAcceptor(this), 1000);
return;
}
Debug.Assert(_state == StateClosed);
@@ -1796,15 +1800,6 @@ namespace IceInternal
_acceptorStarted = false;
_acceptor.close();
-
- //
- // If the acceptor hasn't been explicitly stopped (which is the case if the acceptor got closed
- // because of an unexpected error), try to restart the acceptor in 5 seconds.
- //
- if(_state == StateHolding || _state == StateActive)
- {
- _instance.timer().schedule(new StartAcceptor(this), 1000);
- }
}
private void warning(Ice.LocalException ex)