mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Forcefully shutdown RPC to prevent hangs (#6412)
This commit is contained in:
parent
2c2080df12
commit
699471f27a
@ -93,7 +93,14 @@ class RPC:
|
|||||||
self._started, _discard, self._site = (
|
self._started, _discard, self._site = (
|
||||||
True,
|
True,
|
||||||
await self._runner.setup(),
|
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:
|
except Exception as exc:
|
||||||
log.exception("RPC setup failure", exc_info=exc)
|
log.exception("RPC setup failure", exc_info=exc)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user