mirror of
https://github.com/a-bad-dev/irc2bash.git
synced 2026-06-09 08:56:31 +00:00
Avoid 100% CPU loop during heavy usage
This commit is contained in:
parent
2fbc2cf051
commit
ca21c914ef
1 changed files with 4 additions and 4 deletions
6
main.py
6
main.py
|
|
@ -338,9 +338,9 @@ class Server():
|
||||||
|
|
||||||
self.privmsg(target_channel, line)
|
self.privmsg(target_channel, line)
|
||||||
|
|
||||||
# Wait is required to fetch exit code
|
# Break if our child exits for any reason
|
||||||
proc.wait()
|
if proc.poll():
|
||||||
self.privmsg(target_channel, f"CMD {cmd} exited with returncode {proc.returncode}")
|
break
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
serv = Server(**config.user, **config.bot)
|
serv = Server(**config.user, **config.bot)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue