Skip to content

Commit

Permalink
Forcefully shutdown RPC to prevent hangs (#6412)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kowlin committed Aug 4, 2024
1 parent 2c2080d commit 699471f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion redbot/core/_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,14 @@ async def initialize(self, port: int):
self._started, _discard, self._site = (
True,
await self._runner.setup(),
web.TCPSite(self._runner, host="127.0.0.1", port=port, shutdown_timeout=0),
web.TCPSite(
self._runner,
host="127.0.0.1",
port=port,
shutdown_timeout=120
# Give the RPC server 2 minutes to finish up, else slap it!
# Seems like a reasonable time. See Red#6391
),
)
except Exception as exc:
log.exception("RPC setup failure", exc_info=exc)
Expand Down

0 comments on commit 699471f

Please sign in to comment.