summaryrefslogtreecommitdiff
path: root/cs/demo/Ice/throughput/Server.cs
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2004-08-25 01:16:14 +0000
committerMichi Henning <michi@zeroc.com>2004-08-25 01:16:14 +0000
commite43d41e1908b59df75953c765a8bcda712bfe9ff (patch)
tree9c12895c2bd553ca8d819ca955d5f19984a9118e /cs/demo/Ice/throughput/Server.cs
parenthost for tests (diff)
downloadice-e43d41e1908b59df75953c765a8bcda712bfe9ff.tar.bz2
ice-e43d41e1908b59df75953c765a8bcda712bfe9ff.tar.xz
ice-e43d41e1908b59df75953c765a8bcda712bfe9ff.zip
Fixed incorrect placement of calls to communicator.destroy() in finally
blocks.
Diffstat (limited to 'cs/demo/Ice/throughput/Server.cs')
-rwxr-xr-xcs/demo/Ice/throughput/Server.cs20
1 files changed, 13 insertions, 7 deletions
diff --git a/cs/demo/Ice/throughput/Server.cs b/cs/demo/Ice/throughput/Server.cs
index 7232181b739..47ddd0fecb4 100755
--- a/cs/demo/Ice/throughput/Server.cs
+++ b/cs/demo/Ice/throughput/Server.cs
@@ -37,13 +37,19 @@ public class Server
System.Console.Error.WriteLine(ex);
status = 1;
}
- finally
- {
- if(communicator != null)
- {
- communicator.destroy();
- }
- }
+
+ if(communicator != null)
+ {
+ try
+ {
+ communicator.destroy();
+ }
+ catch(System.Exception ex)
+ {
+ System.Console.Error.WriteLine(ex);
+ status = 1;
+ }
+ }
System.Environment.Exit(status);
}