Closed TychoTheTaco closed 2 years ago
Hi @TychoTheTaco
thanks for your contribution. Indeed that' a possible trap within the current implementation which was not tested - sry. You solution may cause other issues by adding multiple handlers to the event stack, therefore it requires some modification before merging
I've added a check to make sure the callback only gets added if the bar is starting for the first time.
i've applied a slightly modified version of your patch
When you create many progress bars (>10), eventually you will get
MaxListenersExceededWarning
sinceSIGINT
andSIGTERM
listeners keep getting added in the constructor but are never removed. I fixed it by adding them onstart()
/create()
and removing them onstop()