diff options
author | Michi Henning <michi@zeroc.com> | 2004-08-25 01:16:14 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2004-08-25 01:16:14 +0000 |
commit | e43d41e1908b59df75953c765a8bcda712bfe9ff (patch) | |
tree | 9c12895c2bd553ca8d819ca955d5f19984a9118e /cs/demo/Ice/throughput/Client.cs | |
parent | host for tests (diff) | |
download | ice-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/Client.cs')
-rwxr-xr-x | cs/demo/Ice/throughput/Client.cs | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/cs/demo/Ice/throughput/Client.cs b/cs/demo/Ice/throughput/Client.cs index cce67d80d49..db21e17f746 100755 --- a/cs/demo/Ice/throughput/Client.cs +++ b/cs/demo/Ice/throughput/Client.cs @@ -185,13 +185,19 @@ public class Client Console.Error.WriteLine(ex); status = 1; } - finally - { - if(communicator != null) - { - communicator.destroy(); - } - } + + if(communicator != null) + { + try + { + communicator.destroy(); + } + catch(System.Exception ex) + { + Console.Error.WriteLine(ex); + status = 1; + } + } System.Environment.Exit(status); } |