Prompting the user to accept a new certificate hash uses 100% CPU
# Change the certificate hash in the config file.
# Start poezio.
# See a message:
WARNING! Certificate hash changed to <abc...>. Accept? (y/n)
- Check htop and see poezio using 100% CPU.
- Press 'y' and see CPU usage back to normal.
Poezio should never use 100% CPU for a long amount of time. But like this it could keep doing that for days if I never check the screen session.
I think the problem may be at https://github.com/mathieui/poezio/blob/25d2bcbbffd7038163916b48666830c095d20507/src/core/handlers.py\#L1212, though I am not familiar with asyncio.
I can get a strace if you want, but it isn't looking useful for me.
- Revision 3c46d497 by mathieui on 2015-01-28T08:54:30Z:
Minor fixes to the certificate warning prompt (#2949) - slightly lower the CPU usage (callback instead of active waiting w/ sleep) - make the terminal beep so the user knows something happened - prevent the user “escaping” the prompt by pressing /, s, or S