Closed rptaylor closed 2 months ago
FYI @CastagnaIT this is an easy one-line fix.
thanks change added however the NFAuth is on my repository list just find it
Thanks! Oh okay, I found it here: https://github.com/CastagnaIT/NFAuthenticationKey/commit/9d455f02af0a61aa1159ba9bbe5ab219736ed1ab
Netflix add-on version
N/A
Operative systems used
Linux (Ubuntu / Mint / ...)
Kodi version used
Other (specify in description)
Description of the bug
There is a polling loop with no delay. It executes as fast as possible, burning up 100% CPU and heating up your room.
On some systems (I tested on a VM) it can make the system extremely sluggish and unresponsive, potentially requiring the system to be hard powered off (this might be related to IOPS, not CPU use). You can easily see the problem by inserting a line in the while loop like
print('this loop has no chill')
and see thousands of lines per second being printed.Steps to reproduce the behavior
python NFAuthenticationKey.py
top
in another window or just listen to your CPU fan.Debug log - mandatory
not applicable
Possible fix
Easy, just wait 1s on each loop iteration:
I did this and confirmed it fixed the problem, and the timeout still worked as expected after 5 minutes. I'd make a PR but I don't see the NFAuthenticationKey.py file in github.
Additional context
Tested on Fedora 39.
python 3.12.0 python3-pycryptodomex-3.19.0 python3-websocket-client-1.3.3-5
Screenshots
No response