Skip to content

Commit

Permalink
Fix for yet another race condition in LRU
Browse files Browse the repository at this point in the history
  • Loading branch information
andresriancho committed Mar 26, 2019
1 parent bbdfc3f commit 7a375e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions w3af/core/data/misc/response_cache_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def get_response_cache_key(self,

try:
result = self._cache.get(cache_key, None)
except AssertionError:
except (AssertionError, KeyError) as _:
# This is a rare race conditions which happens when another
# thread modifies the cache and changes the __first item in
# the cache.
Expand All @@ -165,7 +165,7 @@ def get_response_cache_key(self,

try:
self._cache[cache_key] = result
except AssertionError:
except (AssertionError, KeyError) as _:
# This is a rare race conditions which happens when another
# thread modifies the cache and changes the __first item in
# the cache.
Expand Down

0 comments on commit 7a375e6

Please sign in to comment.