Permalink
Browse files

Error handling

  • Loading branch information...
1 parent b7fb987 commit 56c2b2f52e1c25951472fe0667779f893797e573 @ayende ayende committed Dec 8, 2011
Showing with 10 additions and 3 deletions.
  1. +10 −3 Raven.Database/Server/HttpServer.cs
@@ -487,9 +487,16 @@ private bool DispatchRequest(IHttpContext ctx)
}
finally
{
- CurrentOperationContext.Headers.Value = new NameValueCollection();
- currentDatabase.Value = DefaultResourceStore;
- currentConfiguration.Value = DefaultConfiguration;
+ try
+ {
+ CurrentOperationContext.Headers.Value = new NameValueCollection();
+ currentDatabase.Value = DefaultResourceStore;
+ currentConfiguration.Value = DefaultConfiguration;
+ }
+ catch
+ {
+ // this can happen during system shutdown
+ }
}
return false;
}

0 comments on commit 56c2b2f

Please sign in to comment.