Skip to content
This repository has been archived by the owner on Nov 19, 2022. It is now read-only.

Commit

Permalink
2008-12-01 Marek Habersack <mhabersack@novell.com>
Browse files Browse the repository at this point in the history
	* src/Mono.WebServer/BaseApplicationHost.cs: check if the key
	exists in the handlers cache after acquiring the lock and update
	it instead of adding.

svn path=/trunk/xsp/; revision=120349
  • Loading branch information
grendello committed Dec 1, 2008
1 parent bcac9c9 commit 38727aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
2008-12-01 Marek Habersack <mhabersack@novell.com>

* src/Mono.WebServer/BaseApplicationHost.cs: check if the key
exists in the handlers cache after acquiring the lock and update
it instead of adding.

2008-11-28 Marek Habersack <mhabersack@novell.com>

* src/Mono.WebServer/BaseApplicationHost.cs: add locking to avoid
Expand Down
5 changes: 4 additions & 1 deletion src/Mono.WebServer/BaseApplicationHost.cs
Expand Up @@ -218,7 +218,10 @@ public virtual bool IsHttpHandler (string verb, string uri)
bool handlerFound = LocateHandler (verb, uri);

lock (handlersCacheLock) {
handlersCache.Add (cacheKey, handlerFound);
if (handlersCache.ContainsKey (cacheKey))
handlersCache [cacheKey] = handlerFound;
else
handlersCache.Add (cacheKey, handlerFound);
}

return handlerFound;
Expand Down

0 comments on commit 38727aa

Please sign in to comment.