Skip to content

Commit

Permalink
bring semaphore from 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
duartecoelhomovai committed Jul 25, 2024
1 parent 9a55a21 commit 8775092
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gd_node/protocols/http/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ async def middleware(self, request, handler):
except Exception as e:
LOGGER.error(e)
raise web.HTTPForbidden(reason=e.__str__())
return await handler(request)
semaphore = asyncio.Semaphore(5)
async with semaphore:
return await handler(request)


@web.middleware
Expand Down

0 comments on commit 8775092

Please sign in to comment.