Skip to content

Commit d395972

Browse files
committed
fix: avoid binding loop on invalid keys with direct lookup
1 parent dc7f0c0 commit d395972

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

async_lru/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,7 @@ async def __call__(self, /, *fn_args: Any, **fn_kwargs: Any) -> _R:
237237

238238
loop = asyncio.get_running_loop()
239239
key = _make_key(fn_args, fn_kwargs, self.__typed)
240-
try:
241-
cache_item = self.__cache.get(key)
242-
except TypeError:
243-
# Avoid binding loop affinity for invalid keys.
244-
raise
240+
cache_item = self.__cache.get(key)
245241
self._check_loop(loop)
246242

247243
if cache_item is not None:

0 commit comments

Comments
 (0)