diff options
author | Mike Mazur | 2008-08-01 01:14:40 +0000 |
---|---|---|
committer | Mike Mazur | 2008-08-01 01:14:40 +0000 |
commit | 6f975f6eeb017e46920d00e47b37b1a789f147b0 (patch) | |
tree | 2499b796e6c3c3288bbb57daddb98348ad6c3757 /OpenSim | |
parent | Apply updated patch from issue 1871. Thanks sempuki. (diff) | |
download | opensim-SC-6f975f6eeb017e46920d00e47b37b1a789f147b0.zip opensim-SC-6f975f6eeb017e46920d00e47b37b1a789f147b0.tar.gz opensim-SC-6f975f6eeb017e46920d00e47b37b1a789f147b0.tar.bz2 opensim-SC-6f975f6eeb017e46920d00e47b37b1a789f147b0.tar.xz |
Thanks, Zaki, for a patch that addresses unhandled exceptions in the
PluginLoader when servers are started in parallel.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/PluginLoader.cs | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/OpenSim/Framework/PluginLoader.cs b/OpenSim/Framework/PluginLoader.cs index 3bc4de6..7a09aee 100644 --- a/OpenSim/Framework/PluginLoader.cs +++ b/OpenSim/Framework/PluginLoader.cs | |||
@@ -232,11 +232,24 @@ namespace OpenSim.Framework | |||
232 | // The Mono addin manager (in Mono.Addins.dll version 0.2.0.0) | 232 | // The Mono addin manager (in Mono.Addins.dll version 0.2.0.0) |
233 | // occasionally seems to corrupt its addin cache | 233 | // occasionally seems to corrupt its addin cache |
234 | // Hence, as a temporary solution we'll remove it before each startup | 234 | // Hence, as a temporary solution we'll remove it before each startup |
235 | if (Directory.Exists("addin-db-000")) | 235 | try |
236 | Directory.Delete("addin-db-000", true); | 236 | { |
237 | if (Directory.Exists("addin-db-000")) | ||
238 | Directory.Delete("addin-db-000", true); | ||
237 | 239 | ||
238 | if (Directory.Exists("addin-db-001")) | 240 | if (Directory.Exists("addin-db-001")) |
239 | Directory.Delete("addin-db-001", true); | 241 | Directory.Delete("addin-db-001", true); |
242 | } | ||
243 | catch (IOException e) | ||
244 | { | ||
245 | // If multiple services are started simultaneously, they may | ||
246 | // each test whether the directory exists at the same time, and | ||
247 | // attempt to delete the directory at the same time. However, | ||
248 | // one of the services will likely succeed first, causing the | ||
249 | // second service to throw an IOException. We catch it here and | ||
250 | // continue on our merry way. | ||
251 | // Mike 2008.08.01, patch from Zaki | ||
252 | } | ||
240 | } | 253 | } |
241 | 254 | ||
242 | private static TextWriter prev_console_; | 255 | private static TextWriter prev_console_; |