diff --git a/bananas_server/application/bananas_server.py b/bananas_server/application/bananas_server.py index cb3a044..eebdaaa 100644 --- a/bananas_server/application/bananas_server.py +++ b/bananas_server/application/bananas_server.py @@ -266,6 +266,14 @@ async def receive_PACKET_CONTENT_CLIENT_CONTENT(self, source, content_infos): filename=safe_filename(content_entry), stream=stream, ) + except asyncio.CancelledError: + stats_download_failed.labels( + content_type=get_folder_name_from_content_type(content_entry.content_type), + version=get_version_from_source(source), + ).inc() + + # Our coroutine is cancelled, pass it on the the caller. + raise except StreamReadError: stats_download_failed.labels( content_type=get_folder_name_from_content_type(content_entry.content_type),